|11-14-2010, 09:56 PM||#1|
Join Date: Aug 2009
Location: Bangkok, Thailand
Device: Kindle Paperwhite
Automatic Web conversion to mobi/epub and send mail by Calibre
Calibre is a great freeware for ebook library, ebook conversion, and offline newsfeeds.
I usually use Calibre to automatically download news feeds, covert them to ebook, and ready to be uploaded to my Kindle every night. However, those news feeds source must be either .rss, or .xml format.
I have quite a number of weblogs which I want Calibre to work like the news feeds; but so far Calibre does not support scheduled web-to-mobi conversion.
However, Calibre has a lot of hidden and powerful tools which allow me to do it, though, without friendly user interface. Calibre has the following commands:
web2disk.exe (for downloading webpages to local harddisk)
ebook-convert.exe (for converting any xxx format to yyy format)
calibre-smtp (for sending document to any email address)
For example, I wish to convert the following weblog to epub and mobi every Monday night because Uncle Rod usually writes a new blog on Sunday (Thanks uncle!):
This weblog is a simple page with photos and I want to have only this web page in my Kindle as a mobi book, and in my iPad as an epub one. What I need is four command lines from Calibre, and Microsoft Windows Scheduled Task function.
Here are the command lines I use:
rem ****** download web content to PC *******
start/wait web2disk http://uncle-rods.blogspot.com -r 0 --dont-download-stylesheets
rem ****** convert html to epub *******
start/wait ebook-convert index.xhtml unclerod.epub --authors "Rod Mollise" --author-sort "Mollise, Rod" --cover "http://skywatch.brainiac.com/astroland/rodnow.jpg" --level1-toc //h:h2 --no-chapters-in-toc
rem ****** convert html to mobi *******
start/wait ebook-convert index.xhtml unclerod.mobi --authors "Rod Mollise" --author-sort "Mollise, Rod" --cover "http://skywatch.brainiac.com/astroland/rodnow.jpg" --level1-toc //h:h2 --no-chapters-in-toc
rem ****** Send Mobi ebook to Kindle free mail ******
start/wait calibre-smtp email@example.com firstname.lastname@example.org "Just for you." -r smtp.mail.yahoo.com -u email@example.com -p xxxx -e SSL --port 465 -s "Uncle Rod Weekly Astro Blog" -a "unclerod.mobi"
rem ****** Send ePub ebook to yahoo mail for reading on iPad ******
start/wait calibre-smtp firstname.lastname@example.org email@example.com "Just for you." -r smtp.mail.yahoo.com -u firstname.lastname@example.org -p xxxx -e SSL --port 465 -s "Uncle Rod Weekly Astro Blog" -a "unclerod.epub"
where: - u = email user name, -p = email password, -s = email subject
The first command will save the web page to my local disk (-r 0 means save only this page, don't retrieve the linked pages)
The second command will convert the saved web page to an epub book named unclerod.epub. The command also puts the author name, and cover photo into the book automatically.
The third command is same as the second command, but generate a mobi output, instead of an ePub one.
The fourth command is to send the generated mobi ebook to my kindle free mail (by using my yahoo mail as a relay sender) so that I can download it to my Kindle anywhere I have wifi connection.
The last command is to send the generated epub ebook to my yahoo mail, so I can download it to my iPad (anywhere I have wifi or 3g connection) and use either Kobo reader or Stanza to read it, without the need for iTunes. I now prefer Kobo because it has builtin-offline dictionary.
I create a DOS batch file, named unclerod.bat, containing all the above commands
I then use Scheduled Task function in Windows Control Panel to schedule this unclerod.bat file to run every Monday night.
That's all I would like to share. Hope you'll enjoy reading on your Kindle more.
For more information about these three commands:
Thanks Kovid, Terisa de Morgan, and beowulf573 (Eddie) for your help on this.
Last edited by bthoven; 11-14-2010 at 11:05 PM.
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|.epub to .mobi conversion Kindle3||cyberdyne||Calibre||4||09-23-2010 08:41 AM|
|epub to mobi conversion problem.||lutwey||Calibre||0||09-18-2010 11:51 AM|
|Epub to Mobi conversion||MichaelGray||Calibre||2||08-12-2010 01:08 PM|
|Classic Automatic Webblog conversion to epub by Calibre||bthoven||Barnes & Noble NOOK||2||03-25-2010 06:18 AM|
|Conversion Error lrf -> mobi/epub (Calibre 0.6.33)||Joerg_Mosthaf||Calibre||2||01-13-2010 07:40 AM|