Sunday 10 July 2011

Fetching Daily News for Kindle 3

Here are some basic steps to setup in order to send daily news to kindle.
1) Assumptions
  •    Kindle set up (email filter/authorization etc)
  •   Caliber (http://calibre-ebook.com/) installed on windows 7
  •   Wakeup on Stand By (http://www.dennisbabkin.com/php/download.php?what=WOSB) installed
  •  Using gmail account to send email to Kindle
  •   Tips: wake up computer by WOSB at about 5 minutes before windows scheduled job using the following script file.
2) Batch file sample
  1. File 1:  KindleGetNewsPaper.bat (This file will be called multiple times to get multiple news)

rem http://www.mobileread.com/forums/archive/index.php/t-97335.html
@echo off
set NEWSFOLDER=D:\eBook\news
set CALIBRE=C:\Program Files (x86)\Calibre2
set NEWSTITLE=%2
rem get rid of " but keep space
set RECEIPE=%NEWSTITLE:"=%
rem get rid of space and - for proper file name
set FILENAME=%RECEIPE: =%
set FILENAME=%FILENAME:-=%
set NEWSFILE="%NEWSFOLDER%\%FILENAME%.mobi"

rem call "%CALIBRE%\ebook-convert.exe" "%CALIBRE%\resources\recipes\%RECEIPE%.recipe"  %NEWSFILE% --test -vv --debug-pipeline debug
call "%CALIBRE%\ebook-convert.exe" "%CALIBRE%\resources\recipes\%RECEIPE%.recipe"  %NEWSFILE%
call "%CALIBRE%\calibre-smtp.exe" -r smtp.gmail.com --port 587 -u MyGoolEmalAddress@gmail.com -p %1 -a %NEWSFILE% -s "[c] %RECEIPE%" MyGoolEmalAddress@gmail.com MyKindleEmailAddress@free.kindle.com "[cnf] %RECEIPE% %DATE% %TIME%"
del /f %NEWSFILE%


  1. KindleGetNewsPapers.bat (call File 1 for the news papers you are interested)

set GETNEWS=D:\tools\windows\CalibreKindleNewsFeed\KindleGetNewsPaper.bat
call %GETNEWS% %1 "CBC Canada"
call %GETNEWS% %1 "CNN"

call %GETNEWS% %1 "Le Mondle"


  1. Final Batch File: Used for the window scheduler:

call "D:\tools\windows\CalibreKindleNewsFeed\KindleGetNewsPapers" MyPasswordOfGmail