Skip to content

Instantly share code, notes, and snippets.

@jrejaud
Created December 26, 2020 07:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jrejaud/58f9fba9aa14e1d42f7ebf84c5d7bb21 to your computer and use it in GitHub Desktop.
Save jrejaud/58f9fba9aa14e1d42f7ebf84c5d7bb21 to your computer and use it in GitHub Desktop.
Send local epubs and pdfs to kindle
# Send to Kindle
# Sends epubs and pdfs to Kindle (converting epubs to mobi along the way)
RES=$(curl -b 'session=$SESSION_ID' -F "kindle_email=$KINDLE_EMAIL" -F "amazon_email=$AMAZON_EMAIL" -F "files[]=@\"$1\"" https://www.sendepubtokindle.com/api/upload)
if [ "$RES" == "null" ]; then
echo "File send to Kindle"
else
echo $RES
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment