View Single Post
Old 12-27-2010, 03:26 PM   #1
mean_gene
Enthusiast
mean_gene began at the beginning.
 
Posts: 41
Karma: 10
Join Date: Dec 2010
Device: Kindle 3G/Wifi
Auto send diff feeds to multiple devices tutorial

I saw a request for something like this so here we go...this will allow you to auto send different feeds to different devices (for windows).

I have two seperate custom news feeds (one for me, one for the wife) that I pull down and send to seperate email addresses (one for each K3). The Calibre GUI doesn't support this but the command line options work pretty well.

I've had to split it up into multiple batch files since the Calibre command lines force the batch files to end prematurely. Haven't seen the source code so I'm not really sure why that happens.

First to pull down the feed(s). Create one batch file for each feed you want to pull down. Obviously you'll want to use different names for the output files:

Code:
ebook-convert custom.recipe filename.mobi --output-profile=kindle

Now to send the feed(s). Create one batch file for each file you want to send:

Code:
calibre-smtp -r smtp.gmail.com --port 587 -u user@gmail.com -p password -a filename.mobi user@gmail.com user@free.kindle.com ""
Task scheduler setup. Here's where we automate everything:

Create a seperate task for each of the batch files. I put 20 mins between my feed_download.bat and feed_send.bat to give the downloads enough time to finish. I also have my BIOS turn on the system in the morning and a scheduled task to shut the system down after the files are sent.

If I could figure out why Calibre kills the batch files then I would combine all the ebook-convert and calibre-smtp commands into one batch file.

The command line options should be the same for *nix though you'll have to use a cronjob instead of the task scheduler (cron will probably work better).
mean_gene is offline   Reply With Quote