Last active
January 3, 2016 02:09
-
-
Save daktak/8393975 to your computer and use it in GitHub Desktop.
Push a Calibre recipe to your Kindle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DOWNLOAD_DIRECTORY="/pub/sabnzbd/books" | |
CALIBRE_PATH=/usr/bin | |
PORT="25" | |
SERVER="localhost" | |
ENCRYPTION_METHOD="NONE" | |
KINDLE_EMAIL="[email protected]" | |
FROM_EMAIL="[email protected]" | |
PROFILE="kindle_pw" | |
TODAY=`date --date="now" +%d/%m/%y` | |
#take recipe name as input | |
#find using ebook-convert --list-recipes | |
RECIPE="$1" | |
OUT_FORMAT=mobi | |
#pull the news site | |
eval ebook-convert \'$RECIPE.recipe\' \'/tmp/$RECIPE.$OUT_FORMAT\' --output-profile $PROFILE | |
#add the date to the title | |
eval ebook-meta \'/tmp/$RECIPE.$OUT_FORMAT\' -t \'/tmp/$RECIPE $TODAY\' | |
eval calibre-smtp -r $SERVER --port $PORT -e $ENCRYPTION_METHOD -v $FROM_EMAIL $KINDLE_EMAIL 'Attached' -a \'/tmp/$RECIPE.$OUT_FORMAT\' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment