Mobileread
impserve: serving content and accessing the internet for the 1200/1150
#11  nrapallo 08-29-2008, 08:58 AM
Quote derrell
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 -
Did you try copying in the entire 'content' directory from the Linreb-0.2.02 package? Just the index.html is in ashkulz's v0.2 post above; it's missing the rest of the files to make it work.

Otherwise, "roll your own" index.html.
Reply 

#12  nrapallo 08-29-2008, 09:04 AM
I have tried the same ebook reader actions under two 'surf the internet' solutions: one being impserve; the other being 'Linreb+privoxy'. I only used the REB1200, so far, haven't tried the EBW1150 yet.

I attach the log results from both and you can see that the transfer times are much slower in impserve. Now to find the cause of it and if it is system related...

BTW, Ashish, notice the last log entry; it's a delete request from the online bookshelf that could be implemented in impserve. Linreb also ignores that delete request. Food for thought...
[txt] impserve-log-WinXP.txt (3.0 KB, 1077 views)
[txt] Linreb+privoxy-log-WinXP.txt (27.1 KB, 1105 views)
Reply 

#13  derrell 08-29-2008, 09:06 AM
Quote nrapallo
Did you try with the entire 'content' directory from the Linreb-0.2.02 package?
Yep tried both access to the net has been flaky for me with my eb-1150 anyway. It could very well be a problem with my box somewhere. Permissions, or something.

I'll try some more later I'm off to bed for now. Just got in from work a couple of hours ago.
Reply 

#14  Ret 08-29-2008, 09:41 AM
IMPRESSIVE work! Congratulations ashkulz! Thank you for your effort!
I downloaded Portable Python and in a minute Impserve was up and running!

I'd change the first hard-coded web page to use an index.html file. It nows shows two links: local contents, and online library which I find to be unnecessary. Just open local contents page.

I'm adding the HTML code I use as index.html to show a Google search, a link to an IMP book in mobileread and a link to the forum message where it was found.
So far it seems you cannot directly download ebooks from Mobileread. As I said before, this is becausem Mobileread webservers (as almost ALL webservers) doesn't know the MIME type application/x-softbook and handles IMP files with type unknown/unknown. Is there a way to change those HTTP headers to "Conten-type: applicaction/x-sofbook"?

Thanks again for your code. It's incredible that such few lines of code resolves HOURS of testing, settings, etc. Well done!

Code
<html>
<head>
<title>Welcome to ImpServe</title>
</head>
<body>
<p><h1> Welcome to Impserve</h1>
</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<center>
<img alt="Google" src="http://www.google.com/intl/en/images/about_logo.gif" height=65 width=175>
</center>
<p>
<form name=Search method=GET action="http://www.google.com/search?hl=en">
<input type=text name='q' size=22 maxlength=2048 value="">
<input type=submit name="btnG" value="Search"></form>
</p>
<p>&nbsp;</p>
<center>
<a href="http://www.mobileread.com/forums/attachment.php?attachmentid=15610&d=1219722410
">Link to an IMP ebook in Mobileread</a>
<a href="http://www.mobileread.com/forums/showthread.php?t=28232">Link to a Mobileread forum</a>
</center>
</body>
</html>
Reply 

#15  nrapallo 08-29-2008, 10:03 AM
Quote Ret
IMPRESSIVE work! Congratulations ashkulz! Thank you for your effort! ... Thanks again for your code. It's incredible that such few lines of code resolves HOURS of testing, settings, etc. Well done!
I echo the same sentiment. You look at that python code and say "WOW". I guess you have to be a techie to really appreciate what Ashish has done!

Thanks, Ret, for the startup page; it was a bit minimalist. I would leave the 'Online Bookshelf' link, for nothing else, but the novelty of it!

It only gets better and better... What next, whispernet!
Reply 

#16  ashkulz 08-29-2008, 10:31 AM
Quote nrapallo
I have tried the same ebook reader actions under two 'surf the internet' solutions: one being impserve; the other being 'Linreb+privoxy'. I only used the REB1200, so far, haven't tried the EBW1150 yet.

I attach the log results from both and you can see that the transfer times are much slower in impserve. Now to find the cause of it and if it is system related...

BTW, Ashish, notice the last log entry; it's a delete request from the online bookshelf that could be implemented in impserve. Linreb also ignores that delete request. Food for thought...
I know the problem, it's that when the log is printed the it does a reverse lookup on the IP address of your ebook, which is what causes the latency. I fixed it by adding an entry to the hosts file yesterday, but forgot to add the fix: I'm attaching 0.2.1 for now. I'll be working on a 0.3 release for tomorrow, so please let the feature requests come in -- I'd really appreciate a comprehensive list so I know what to shoot for
[txt] impserve-0.2.1.py.txt (12.1 KB, 1102 views)
Reply 

#17  nrapallo 08-29-2008, 11:18 AM
Quote ashkulz
please let the feature requests come in -- I'd really appreciate a comprehensive list so I know what to shoot for
OK, first on my list would be, as stated before:

Cache "Content-type: text/html" transfers and before you send them onto the ebook reader, in response to the HTTP GET, text substitute, at least:
Code
- <a href> WITH <a UNDERLINE="YES" href> (so that you can SEE hyperlinks)
- <body> WITH <body style="margin-left:2%; margin-right:2%"> (so there's no edge-bleeding - can use 2px instead of 2% or even 0)
In addition, to simulate a back function, remember the last html "visited" and when the directory icon is tapped ( HTTP requests to directory.ebooksystem.net, I think ) then go there. It would be nice to remember ALL sites visited so that we could go back to the start page, if we liked!

However, I see where this could pose a problem; if we want a quick restart. I would recommend that a 'bookshelf' request then clear this cached list of websites visited and restore the directory icon's function. What do you think?

That's it for now...

Did I mention whispernet?
Reply 

#18  Ret 08-29-2008, 03:54 PM
Don't forget to:
- Handle internet links within ebooks. Impserve should be able of stripping the redirection URL that ebooksystem.net uses.
- Change content-type header to application/x-softbook when downloading an IMP file from a server that doesn't know that MIME type.
- Let the reader delete ebooks from the online bookshelf.

that's all that comes to mind.... THANKS!
Reply 

#19  nrapallo 08-29-2008, 08:34 PM
Quote ashkulz
I know the problem, it's that when the log is printed the it does a reverse lookup on the IP address of your ebook, which is what causes the latency. I fixed it by adding an entry to the hosts file yesterday, but forgot to add the fix: I'm attaching 0.2.1 for now. I'll be working on a 0.3 release for tomorrow, so please let the feature requests come in -- I'd really appreciate a comprehensive list so I know what to shoot for
WOW, that returned and maybe improved my surfing speed. No more slow downs with WinXP and impserve!!!

Truly amazing!

I can't wait to see your version 0.3... (wipes chin now)

p.s. Ashish, I attach a privoxy log showing three ways to get a .imp ebook from Mobileread.com; each with a different Content-type! Please see attached text log.

This may help determine the best way to download .imp ebooks directly from Mobileread!
[txt] privoxy-log_imp-ebook-GET_three variations.txt (3.8 KB, 1039 views)
Reply 

#20  ashkulz 08-30-2008, 04:31 AM
Quote nrapallo
WOW, that returned and maybe improved my surfing speed. No more slow downs with WinXP and impserve!!!

Truly amazing!

I can't wait to see your version 0.3... (wipes chin now)

p.s. Ashish, I attach a privoxy log showing three ways to get a .imp ebook from Mobileread.com; each with a different Content-type! Please see attached text log.

This may help determine the best way to download .imp ebooks directly from Mobileread!
I've already figured out #2 and #3: look at the "Content-disposition" header, and if it provides a filename call mimetypes.guess_type on the file which will give the correct MIME type. I'm more hesitant of doing it for URLs where they don't specify Content-disposition and the URL ends with .imp and the content-type is not correct: it may be a valid URL. You can choose to override it in the plugins system I plan to develop.
Reply 

 « First  « Prev Next »  Last »  (2/19)
Today's Posts | Search this Thread | Login | Register