upkindle.sh 1.2 KB

12345678910111213141516171819202122232425262728293031
  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 "samP@n?1" --encryption-method SSL vortify-lc@algometic.com larry1chan11@kindle.com ""
  25. calibre-smtp --subject "oriental news $TODAY" --attachment $MOBIPATH/$TODAY-orient.epub --relay smtp.qq.com --port 465 --username larry1chan@qq.com --password "xhybazbbucdyceed" --encryption-method SSL larry1chan@qq.com larry1chan11@kindle.com ""
  26. #calibre-smtp --subject "oriental news $TODAY" --attachment $MOBIPATH/$TODAY-orient.epub --relay smtp.qq.com --port 587 --username larry1chan@qq.com --password "xhybazbbucdyceed" --encryption-method SSL larry1chan@qq.com larry1chan11@kindle.com ""
  27. #
  28. # rm mobi file
  29. #
  30. rm $MOBIPATH/$TODAY-orient.mobi