Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-15-2011, 09:18 AM   #1
lenkost
Member
lenkost began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2011
Device: Kindle3, Sony PRS-505
Solution: getting Internet books using Kindle browser

Hello, everyone.
I just got my first Kindle 3 couple days ago. Used Sony PRS-505 before.
I have always wanted to get free stuff available on Internet (legal) into Reader without hassle of downloading, converting, USB cables etc.
Today I finally got my wish.

Here are the steps:
1. Find a book published on Internet as HTML file using Kindle browser.
2. Add a prefix " myComputerURL.com?url=" to book URL
Like this: myComputerURL.com?url=HTTP://BookURL.com
3. In 2-3 min. book shows up on my Kindle.

Behind the scene the processing is done by Windows IIS server on my home computer and Calibre Command line utilities.
Server receives book URL, saves it to a text file on local C drive.
A simple VB6 application is scanning for this file every 5 sec.
Upon receiving the file it starts three Calibre utilities using the received URL: web2disk , ebook-convert , calibre-smtp.

web2disk receives HTML page,
ebook-convert converts it into mobi,
calibre-smtp sends it to Kindle.

Now I need to find time to actually read these books
lenkost is offline   Reply With Quote
Old 08-15-2011, 02:51 PM   #2
Giggleton
Suspended
Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.Giggleton ought to be getting tired of karma fortunes by now.
 
Posts: 1,687
Karma: 4368191
Join Date: Jan 2011
Location: Oregon
Device: Kindle3
That's neat, have you checked out Instapaper? or the Project Gutenberg Magic ebook?

I'd be interested in a more detailed explanation of your methods as well. Specifically about how you handle the various formatting of HTML books?
Giggleton is offline   Reply With Quote
Old 08-15-2011, 03:03 PM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,530
Karma: 43837842
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
This sounds like a pretty cool personalized in-house solution—except for the IIS bit, mind you.
I may attempt something similar. Thanks for the prod.
DiapDealer is online now   Reply With Quote
Old 08-15-2011, 07:06 PM   #4
lenkost
Member
lenkost began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2011
Device: Kindle3, Sony PRS-505
Giggleton: with instaPaper you need to wait for a book - they deliver on daily schedule. In my case I receive book in 2-3 min. after request. And you cannot do it from Kindle browser. As far as formatting it is done by Calibre utility and is quite good.

DiapDealer: It is possible to do without IIS by using Outlook macro like this:

Code:
Public WithEvents myOlItems As Outlook.Items
Public Sub Application_Startup()
    Set objInbox = Session.GetDefaultFolder(olFolderInbox).Items
End Sub

Private Sub myOlItems_ItemAdd(ByVal Item As Object)
      If TypeName(Item) = "MailItem" Then
           If InStr(1, Item.Subject, "passfrase", vbTextCompare) > 0 Then
               Set fs = CreateObject("Scripting.FileSystemObject")
               Set f = fs.CreateTextFile("c:\Kindle\Link.txt", True)
               f.WriteLine (Item.Body)
               f.Close
           End If
      End If
End Sub
Most browser including iPhone and iPad have "send Link via email" option. Enter any passfrase in email subject and Outlook on your computer will create Link.txt file with page URL. And the rest of it as above.

This cannot be used from Kindle itself and the Outlook must be always on.
This was my original approach but I prefer IIS much better.
lenkost is offline   Reply With Quote
Old 08-15-2011, 07:16 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 9,530
Karma: 43837842
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
This was my original approach but I prefer IIS much better.
You misunderstand me... I'll be leaning toward Apache/Nginx + PHP, Python and cron.
But I thank you for the idea of using a parameter to send the url to a local webserver so it can retrieve it for further processing!
DiapDealer is online now   Reply With Quote
Old 08-15-2011, 07:46 PM   #6
lenkost
Member
lenkost began at the beginning.
 
Posts: 14
Karma: 10
Join Date: Aug 2011
Device: Kindle3, Sony PRS-505
Quote:
I'll be leaning toward Apache/Nginx + PHP, Python and cron.
Good choice.
Here is the batch file I am using to process the book. You can adjust it to your environment.
Code:
cd \
cd "C:\Program Files\Calibre2"
Start /wait web2disk -r 0 -d C:\Kindle http://www.<theBook>.html
Start /wait ebook-convert c:\Kindle\<theBook>.xhtml c:\Kindle\<Name to show in Kindle>.mobi
Start /wait calibre-smtp -a C:\Kindle\<Name to show in Kindle>.mobi -s <any subject> <myEmail> <myKindleEmail>@kindle.com <any email body>
lenkost is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Perfect solution: Kindle Browser open links in same window liuto Kindle Developer's Corner 46 09-27-2012 07:04 PM
Behaviour like a internet browser midv Calibre 5 01-08-2011 05:23 PM
How can I view Internet browser pictures chz48jrc enTourage Archive 5 12-16-2010 10:50 PM
PB-902: Internet-Browser bernhard71 PocketBook 4 12-12-2010 04:47 AM
Possible Solution for Tagging Books on Kindle emellaich Amazon Kindle 2 04-24-2010 10:42 AM


All times are GMT -4. The time now is 12:07 PM.


MobileRead.com is a privately owned, operated and funded community.