Mobileread
impserve: serving content and accessing the internet for the 1200/1150
#1  ashkulz 08-28-2008, 08:21 PM
NOTE: impserve is now part of ebookutils which is hosted at http://ebookutils.berlios.de.

I'm proud to release impserve, which will allow you to do the following:
  1. serve as a local content server so that you can download IMP books to your device (you do not need software like GEB Librarian)
  2. serve static pages/media residing on your hard-disk
  3. browse the net using impserve as a proxy server
  4. download .IMP books from the net
  5. automatic conversion of PRC, LIT, DJVU and PDF books to .IMP (via plugins)

Please see the Impserve page for further details on how to configure your ebook, install and use impserve. For downloading the latest version, please visit the ebookutils homepage.

I always planned to do this script, but linreb gave me quite a few good ideas. Big thanks to Nick, Nandu, and all the other people who are helping us to maintain this community
[zip] impserve-0.1.zip (5.2 KB, 1167 views)
[zip] impserve-0.2.zip (5.1 KB, 1239 views)
[zip] ebookutils-0.3.zip (61.5 KB, 1108 views)
[zip] ebookutils-0.4.zip (61.8 KB, 1111 views)
[zip] ebookutils-0.4.1.zip (60.7 KB, 1235 views)
[zip] ebookutils-0.4.2.zip (58.3 KB, 1153 views)
[zip] ebookutils-0.4.2-win32.zip (1.94 MB, 1412 views)
Reply 

#2  nrapallo 08-28-2008, 10:59 PM
NOTE: For more impserve "plugins", see Impserve: user-created Plugins and requests....


Ashish,

I'm using WinXP with ActivePython 2.5.1.1 installed (hey, I compiled PDFRead didn't I?) and I get the segmentation fault below:
Code
E:\ebooks\Impserve>impserve.py -a 192.168.X.XX -p 8118 shelf
Traceback (most recent call last): File "E:\ebooks\Impserve\impserve.py", line 119, in <module> signal.signal(signal.SIGALRM, SIGALRM_handler)
AttributeError: 'module' object has no attribute 'SIGALRM'
Is this a windows thing using alarm()?

Eagerly waiting for a fix, and don't say switch to linux!
Reply 

#3  nrapallo 08-29-2008, 01:14 AM
I already have some suggestions, without even using the program, Sheesh!

When you "serve up" the webpages to the hardware reader, could you text substitute:
- <a href> to <a UNDERLINE="YES" href> (so that you can SEE hyperlinks) - DONE IN LATEST VERSION!
- <body> to <body style="margin-left:2%; margin-right:2%"> (so there's no edge-bleeding) - HAS NO EFFECT SO CAN'T DO THIS!
- etc. (give it time; more suggestions forthcoming...)
Reply 

#4  ashkulz 08-29-2008, 06:38 AM
Quote nrapallo
Is this a windows thing using alarm()?

Eagerly waiting for a fix, and don't say switch to linux!
Released a new version 0.2, with miscellaneous windows compatibility fixes.
Reply 

#5  nrapallo 08-29-2008, 09:04 AM
Congratulations on a finely-crafted all-in-one software solution! Kudos!

OK, works now, sort of.

Have to FIRST change a line in def main(argv) to fix a simple typo ('b' should be 'a'):
Code
opts, args = getopt.getopt(argv, "hb:p:") --> opts, args = getopt.getopt(argv, "ha:p:")
It transfers .imp ebooks OK from the "online bookshelf", but the "local content" traffic seems slower than Linreb + privoxy (especially for MIME image types for .gif/.jpg/.png files).

I initially thought, "Maybe my network is congested?". But after further testing using Linreb instead, I would have to say "No, it seems that impserve is very much slower (guessing about 1/2 to 1/3 the transfer speed of Linreb + privoxy)". It seems to have lost it's "snap"!

Would the python libraries be at fault here? I used my content/index.html from the Linreb package as a test and surfed to the Mobileread Wiki pages.

Can you try a comparison at your end?
Reply 

#6  derrell 08-29-2008, 09:06 AM
Theres a typo in the options so that the -a option isn't recoginized. Its a b instead of an a.
ver .02 line 332
Code
opts, args = getopt.getopt(argv, "hb:p:")
//edit//
Nick beat me to it.

Changed that and it worked fine, had to specify the directory for it to use as a basis for the book shelf though. Just used impserve -a 127.0.0.1 . and it picked up all of the imp files in the current directory and all of those below it. Very nice.

Things keep changing so fast I'll never be able to keep a tutorial up to date on how to get your eb-1150 working with usb and linux.
Reply 

#7  nrapallo 08-29-2008, 09:14 AM
Quote derrell
Theres a typo in the options so that the -a option isn't recoginized. Its a b instead of an a.
ver .02 line 332
Code
opts, args = getopt.getopt(argv, "hb:p:")
//edit//
Nick beat me to it.
Sorry, what's that phrase again "Great minds, ..."

Quote
Changed that and it worked fine, had to specify the directory for it to use as a basis for the book shelf though. Just used impserve -a 127.0.0.1 . and it picked up all of the imp files in the current directory and all of those below it. Very nice.

Things keep changing so fast I'll never be able to keep a tutorial up to date on how to get your eb-1150 working with usb and linux.
Tutorial? what's that and who has the time...

Did you notice any speed degregation in linux? If not, it may just be a windows-specific thing with ActiveState Python 2.5.1.1! Oh, well...
Reply 

#8  derrell 08-29-2008, 09:31 AM
Seems just a touch slower, but its hard to say that just may be an impression.

Tried it with the same book about 500k as close as I can tell they were exactly the same speed wise. Took about 8 seconds with a pause toward the middle of the progress bar for both impserve and linreb. I'm assuming that was when the 1150 was converting the imp to its internal format.
Reply 

#9  nrapallo 08-29-2008, 09:34 AM
Quote derrell
Seems just a touch slower, but its hard to say that just may be an impression.

Tried it with the same book about 500k as close as I can tell they were exactly the same speed wise. Took about 8 seconds with a pause toward the middle of the progress bar for both impserve and linreb. I'm assuming that was when the 1150 was converting the imp to its internal format.
My .imp transfer speed to the reader "seems" OK as well, it's the internet MIME transfers that are very slow, as far as I can tell!
Reply 

#10  derrell 08-29-2008, 09:45 AM
Can't tell you about that all I'm getting is 404 errors when the reader tries to open the index.html file in content.
Code
localhost - - [29/Aug/2008 07:43:32] code 404, message File not found
localhost - - [29/Aug/2008 07:43:32] "GET http://bookshelf.ebooksystem.net/content/ HTTP/1.0" 404 -
Reply 

  Next »  Last »  (1/19)
Today's Posts | Search this Thread | Login | Register