09-05-2008, 12:17 AM | #121 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Back to debugging... |
|
09-05-2008, 01:32 AM | #122 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
My revised PrcConverter.py is: Code:
# v0.1 - Inital plugin idea by ashkulz; Adapted by nrapallo (Sept 2008) import impserve import os, subprocess class PrcConverter(impserve.ProxyResponse): def get_response(self, url, headers, data): #debug statement (TODO: also check if .ext is .prc/.pdb/.mobi) print headers if not 'application/octet-stream' in headers['Content-Type']: return headers, data print "0\n" #debug statement open('input.prc', 'wb').write(data) print "1\n" #debug statement # using a command to convert .prc to .imp 'on the fly'... copied "C:\Program Files\Mobi2IMP\bin\Mobi2IMP.exe" to impserve directory if not subprocess.call(['Mobi2IMP', '--cover', '--out', 'output', 'input.prc']) or not os.path.isfile('output.imp'): return headers, data print "2\n" #debug statement headers['Content-Type'] = 'application/x-softbook' data = open('output.imp', 'rb').read() os.remove('input.prc') os.remove('output.imp') print "3\n" #debug statement return headers, data This is the plugin debug log produced: Code:
Loaded plugin: AdjustHtml.py Loaded plugin: AdjustQueryString.py Loaded plugin: PrcConverter.py impserve 0.4.2: starting server on 127.0.0.1:9090 127.0.0.1 - - [05/Sep/2008 01:12:32] "GET http://authenticate.ebooksystem.net/authenticate/default.asp?SS=1&GUEST_ID=GC0000216225&DEVICE_TYPE=SoftBook&HWSERIES=2250&VERSION=35345&LANG=en&COLOR=NO&DIALED=UNKNOWN&GMT_OFFSET=-14280&SBPISP=NO&SE=1&MESSAGE=5757B0419BE4374C039A10FA38C4EDC70837BB0487AA60F27C9420D03ED187CB&BOOKSHELF=YES HTTP/1.0" 302 - 127.0.0.1 - - [05/Sep/2008 01:12:32] "GET http://bookshelf.ebooksystem.net/content/ HTTP/1.0" 200 - 127.0.0.1 - - [05/Sep/2008 01:12:33] "GET http://www.google.com/intl/en/images/about_logo.gif HTTP/1.0" 200 - Content-Type: image/gif Last-Modified: Wed, 07 Jun 2006 19:37:54 GMT Expires: Sun, 17 Jan 2038 19:14:07 GMT Cache-Control: public Date: Fri, 05 Sep 2008 05:09:44 GMT Server: gws Content-Length: 5548 Connection: Close 127.0.0.1 - - [05/Sep/2008 01:12:37] "GET https://www.mobileread.com/forums/forumdisplay.php?f=128 HTTP/1.0" 200 - Connection: close Set-Cookie: bblastvisit=1220591391; expires=Sat, 05-Sep-2009 05:09:51 GMT; path=/; domain=.mobileread.com Set-Cookie: bblastactivity=0; expires=Sat, 05-Sep-2009 05:09:51 GMT; path=/; domain=.mobileread.com Set-Cookie: bbforum_view=c35555c929d51e1050e745ebb1541863c3e446a6a-1-%7Bi-128_i-1220591391_%7D; path=/; domain=.mobileread.com Expires: 0 Cache-Control: private, post-check=0, pre-check=0, max-age=0 Pragma: no-cache Content-Type: text/html; charset=ISO-8859-1 X-UA-Compatible: IE=7 Date: Fri, 05 Sep 2008 05:09:51 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:42] "GET https://www.mobileread.com/forums/images/mr/misc/logo.gif HTTP/1.0" 200 - Connection: close Content-Type: image/gif Accept-Ranges: bytes ETag: "216147554" Last-Modified: Wed, 09 Apr 2008 09:29:42 GMT Content-Length: 3364 Date: Fri, 05 Sep 2008 05:09:56 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:42] "GET https://www.mobileread.com/forums/images/mr/misc/rss.gif HTTP/1.0" 200 - Connection: close Content-Type: image/gif Accept-Ranges: bytes ETag: "1463968026" Last-Modified: Fri, 18 May 2007 09:42:24 GMT Content-Length: 1024 Date: Fri, 05 Sep 2008 05:09:57 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:46] "GET https://www.mobileread.com/forums/clear.gif HTTP/1.0" 200 - Connection: close Content-Type: image/gif Accept-Ranges: bytes ETag: "1146313854" Last-Modified: Tue, 15 Jul 2008 14:20:24 GMT Content-Length: 43 Date: Fri, 05 Sep 2008 05:10:00 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:46] "GET https://www.mobileread.com/forums/images/mr/misc/f-129.png HTTP/1.0" 200 - Connection: close Content-Type: image/png Accept-Ranges: bytes ETag: "1469148012" Last-Modified: Fri, 22 Jun 2007 14:29:15 GMT Content-Length: 1458 Date: Fri, 05 Sep 2008 05:10:01 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:54] "GET https://www.mobileread.com/forums/showthread.php?t=22663 HTTP/1.0" 200 - Connection: close Set-Cookie: bblastvisit=1220591408; expires=Sat, 05-Sep-2009 05:10:08 GMT; path=/; domain=.mobileread.com Set-Cookie: bblastactivity=0; expires=Sat, 05-Sep-2009 05:10:08 GMT; path=/; domain=.mobileread.com Expires: 0 Cache-Control: private, post-check=0, pre-check=0, max-age=0 Pragma: no-cache Content-Type: text/html; charset=ISO-8859-1 X-UA-Compatible: IE=7 Date: Fri, 05 Sep 2008 05:10:08 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:12:58] "GET https://www.mobileread.com/forums/image.php?u=8654&dateline=1186863588 HTTP/1.0" 200 - Connection: close Cache-control: max-age=31536000 Expires: Sat, 05 Sep 2009 05:10:12 GMT Content-disposition: inline; filename=Sistine_Sibyl.jpg Content-transfer-encoding: binary Content-Length: 3723 Last-Modified: Sat, 11 Aug 2007 20:19:48 GMT ETag: "1186863588-8654" Date: Fri, 05 Sep 2008 05:10:12 GMT Server: Apache Content-Type: image/jpeg 127.0.0.1 - - [05/Sep/2008 01:12:59] "GET https://www.mobileread.com/forums/images/mr/attach/prc.gif HTTP/1.0" 200 - Connection: close Content-Type: image/gif Accept-Ranges: bytes ETag: "81527440" Last-Modified: Fri, 22 Jun 2007 19:12:30 GMT Content-Length: 135 Date: Fri, 05 Sep 2008 05:10:14 GMT Server: Apache 127.0.0.1 - - [05/Sep/2008 01:13:02] "GET https://www.mobileread.com/forums/attachment.php?attachmentid=12111&d=1207787498 HTTP/1.0" 200 - Connection: close Vary: User-Agent X-UA-Compatible: IE=7 Cache-control: max-age=31536000, private Expires: Sat, 05 Sep 2009 05:10:16 GMT Last-Modified: Thu, 10 Apr 2008 00:31:38 GMT ETag: "12111" Accept-Ranges: bytes Content-disposition: attachment; filename="Pozzuoli_War%20of%20the%20Wenuses.prc" Content-Length: 105285 Date: Fri, 05 Sep 2008 05:10:16 GMT Server: Apache Content-Type: application/octet-stream 0 1 Mobi2IMP (version 9.4b) Copyright (C) 2008 Nick Rapallo (nrapallo) FULLFILENAME: input.prc FILENAME : input.prc EXPLODEPATH : .\ EXPLODEDIR : input DatabaseName: Pozzuoli_War of the Wenuses Version : 0 Type : TEXt Creator : REAd baktime : -2082844800 # of records: 20 --------------------------------------------------- --------------------------------------------------- Found 1 images Looking for filepos Found all 17 filepos Adding name attributes WARNING 17: 0000077137 - Not an anchor: Fixing filepos attribute EBW 1150 ebook created! (reader responded "Unknown document type" at this point and the plugin failed to print "2") (directory icon tapped to go back one webpage) 127.0.0.1 - - [05/Sep/2008 01:13:31] "GET http://directory.ebooksystem.net/directory/default.asp HTTP/1.0" 302 - 127.0.0.1 - - [05/Sep/2008 01:13:32] "GET https://www.mobileread.com/forums/forumdisplay.php?f=128 HTTP/1.0" 200 - Connection: close Set-Cookie: bblastvisit=1220591446; expires=Sat, 05-Sep-2009 05:10:46 GMT; path=/; domain=.mobileread.com Set-Cookie: bblastactivity=0; expires=Sat, 05-Sep-2009 05:10:46 GMT; path=/; domain=.mobileread.com Set-Cookie: bbforum_view=16ca0a403c69cd6c63057b53f7c6b162dd613c38a-1-%7Bi-128_i-1220591446_%7D; path=/; domain=.mobileread.com Expires: 0 Cache-Control: private, post-check=0, pre-check=0, max-age=0 Pragma: no-cache Content-Type: text/html; charset=ISO-8859-1 X-UA-Compatible: IE=7 Date: Fri, 05 Sep 2008 05:10:46 GMT Server: Apache Notice above that Mobileread returns a Content-Type of 'application/octet-stream' when requesting the final .prc file. It has the filename there too so the plugin should, in the future, check the .ext to make sure we are doing a valid conversion. Also, it seems that Mobileread uses a mimetype of 'application/x-mobipocket-ebook' for .prc download requests per the more detailed log report created prior to the one above. (See below text file) |
|
Advert | |
|
09-06-2008, 01:05 AM | #123 | ||
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
WOW, wow, wow, I got .prc to .imp working seemlessly!
Quote:
Quote:
A great suggestion from Nate, turns out to be a great convenience to ALL ebookwise 1150 users (and the few REB1200 users here). There are two versions of this plugin for impserve; EBW1150 users will want the 'PrcConverter1150.py'; REB1200 users the 'PrcConverter1200.py'. Don't intermix. You'll need a copy of Mobi2IMP.exe (dos command) to make this work; see here for Mobi2IMP-9.4b-dos.zip. Instructions: ========= 1. For EBW1150 users, download the 'PrcConverter1150.py.txt' and rename 'PrcConverter1150.py'. 2. Place the renamed file in your plugins directory (under your ebookutils/impserve directories). 3. That's it! Download all the non-DRM'ed mobipocket/.prc/.pdb you want to read, onto your reader, using one-step. Enjoy and pass this info onto a friend... Native .imp downloading and now .prc download as well! WOW, wow, wow.... p.s. I also include BELOW updated versions of the AdjustSmallestFont.py for each reader (EBW1150 and REB1200). Last edited by nrapallo; 09-06-2008 at 10:17 AM. Reason: fixing typos |
||
09-06-2008, 08:29 AM | #124 | |
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
Quote:
I've got some new infrastructure enhancements planned in impserve which I plan to implement after this weekend [till which I'm busy in real life]:
|
|
09-06-2008, 02:29 PM | #125 | |
fruminous edugeek
Posts: 6,745
Karma: 551260
Join Date: Oct 2006
Location: Northeast US
Device: iPad, eBw 1150
|
Quote:
Well, maybe not-- she'd be too busy downloading and reading manga. |
|
Advert | |
|
09-06-2008, 03:18 PM | #126 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
I just finished a PDF Converter using PDFRead's dos command to facilitate the actual conversion from .pdf to .imp. It works best with smaller sized documents. I also have finished a DJVU Converter, but it's not easy finding direct .djvu ebooks to download from. Most 'ebooks' are wrapped around a html re-director. I did find some DJVU Editions here (DjVu BUNDLED) and downloaded Jane Austen's Sense and Sensibility here http://www.leoyan.com/djvu-editions..../Download.djvu (only had it convert first 5 of 200+ pages though). While it's nice to have the Converters, they do take a long time and could just as easily be converted offline using PDFRead on the computer and then transferring the resulting .imp, after the conversion, to the ebook reader. Oh, well, it's good to have a choice... p.s. these new plugins will be uploaded shortly... Last edited by nrapallo; 09-06-2008 at 03:20 PM. |
|
09-06-2008, 04:11 PM | #127 |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
cbz is really easy. It is just a zip file containing images that are referenced in alphabetical order. The images themselves can be jpg, gif, or png so they should come across ok to be converted for eb-1150 use. I would expect a tool to simply unzip, size the images, and place them in order with each on a page. An option might be to do landscape and split the images in half for larger pages.
Dale |
09-06-2008, 04:26 PM | #128 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
The CBZ plugin will just call PDFRead, but PDFRead will create the .imp. This is the same method used for the .pdf and .djvu plugins that will be upload here. |
|
09-06-2008, 05:24 PM | #129 |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
For my latest imperve plugins and a mini tutorial on their use, see impserve: user-created plugins and requests....
Ashish, what a pandora's box you have unleashed .... |
09-09-2008, 01:12 PM | #130 |
Mad translator
Posts: 99
Karma: 684
Join Date: Jan 2008
Location: Gradignan près Bordeaux, France
Device: eBookwise 1150 reader, Samsung E60 reader, SAMSUNG N150 netbook
|
My system won't load PrcConverter.py...
The other plugin loads ok, though. Is there an index.html file available somewhere to help testing all those nice new features? Bravo to you, ashkulz and others for those nice programs! Last edited by Roberts324; 09-09-2008 at 01:18 PM. |
09-09-2008, 01:37 PM | #131 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
Are using the windows version of impserve? It currently doesn't load the new plugins that I released; only uses the ones that came with it. - EDIT: works now in version 0.5! Ashkulz is looking into it. A temporary solution would be to install python 2.5 and run the python scripts instead of using the windows version. I got the plugins to work using the python script (run.py) but not the windows version . I think ashkulz may be releasing a new version soon so hopefully this part gets fixed and users can start to enjoy the benefits this program has to offer. The index.html I use is located in this post https://www.mobileread.com/forums/sho...855#post246855 and is in the attachment called content.zip. Have fun! Last edited by nrapallo; 09-09-2008 at 09:55 PM. |
|
09-09-2008, 04:09 PM | #132 | ||
Mad translator
Posts: 99
Karma: 684
Join Date: Jan 2008
Location: Gradignan près Bordeaux, France
Device: eBookwise 1150 reader, Samsung E60 reader, SAMSUNG N150 netbook
|
Quote:
Quote:
Bug report: I have found improper mapping of accented characters, where a lowcase e acute is represented by an upcase Egrave. Visible e.g. at news.google.fr. Amitiés, Robert I should receive my new Asus eee PC 900 tomorrow... more programming ahead... Guess I'll have to draw Delphi from the mothballs... Last edited by Roberts324; 09-09-2008 at 04:33 PM. |
||
09-09-2008, 04:23 PM | #133 | |
Mad translator
Posts: 99
Karma: 684
Join Date: Jan 2008
Location: Gradignan près Bordeaux, France
Device: eBookwise 1150 reader, Samsung E60 reader, SAMSUNG N150 netbook
|
Quote:
|
|
09-09-2008, 05:06 PM | #134 | |
GuteBook/Mobi2IMP Creator
Posts: 2,958
Karma: 2530691
Join Date: Dec 2007
Location: Toronto, Canada
Device: REB1200 EBW1150 Device: T1 NSTG iLiad_v2 NC Device: Asus_TF Next1 WPDN
|
Quote:
See my proposed solution to this problem here. |
|
09-09-2008, 06:49 PM | #135 | ||
Addict
Posts: 350
Karma: 705
Join Date: Dec 2006
Location: Mumbai, India
Device: Kindle 1/REB 1200
|
I've released ebookutils-0.5 at the new site http://ebookutils.berlios.de As it's based on a Wiki, you are free to edit it if you feel you can add something
Quote:
Quote:
|
||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Confused about personal content re: eBookwise 1150 | locomouse | Fictionwise eBookwise | 6 | 11-25-2009 12:52 PM |
PDFRead - reading PDFs on the 1100/1150/1200 eBook Readers | ashkulz | IMP | 87 | 06-04-2009 02:43 PM |
How do you get new content onto your eBookwise 1150 / REB 1200? (pick all that apply) | nrapallo | Fictionwise eBookwise | 23 | 02-03-2009 04:34 PM |
Hacking EBW-1150 to browse the Internet | sputnik | Fictionwise eBookwise | 44 | 08-27-2008 08:40 AM |
Comparing 1150 to 1200 or 2150 | Katelyn | Fictionwise eBookwise | 1 | 04-29-2007 11:38 AM |