upkindle.sh 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. TZ=Asia/Hong_Kong
  3. TODAY=`date +"%Y%m%d"`
  4. ROOTPATH=/calibre
  5. RECIPEPATH=$ROOTPATH/recipe
  6. MOBIPATH=/news
  7. OPTIONS="--output-profile kindle_pw"
  8. echo $RECIPEPATH
  9. #
  10. #
  11. # convert epub to mobi
  12. #
  13. ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.mobi $OPTIONS
  14. #
  15. #
  16. # download news and save output to epub
  17. #
  18. #
  19. ebook-convert $MOBIPATH/$TODAY-orient.mobi $MOBIPATH/$TODAY-orient.epub
  20. #
  21. #
  22. # send book to kindle
  23. #
  24. calibre-smtp --subject "oriental news $TODAY" --attachment $MOBIPATH/$TODAY-orient.epub --relay hwsmtp.exmail.qq.com --port 465 --username vortify-lc@algometic.com --password "adverS@1e" --encryption-method SSL vortify-lc@algometic.com larry1chan11@kindle.com ""
  25. #calibre-smtp --subject "oriental news $TODAY" --attachment $MOBIPATH/$TODAY-orient.epub --relay hwsmtp.exmail.qq.com --port 465 --username vortify-lc@algometic.com --password "ins@neS00n" --encryption-method SSL vortify-lc@algometic.com larry1chan11@kindle.com ""
  26. #
  27. # rm mobi file
  28. #
  29. rm $MOBIPATH/$TODAY-orient.mobi