up2.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. TODAY=`date +"%Y%m%d"`
  3. ROOTPATH=/calibre
  4. RECIPEPATH=$ROOTPATH/recipe
  5. MOBIPATH=$ROOTPATH/recipe/daily_news/oriental
  6. OPTIONS="--output-profile kindle_pw"
  7. echo $RECIPEPATH
  8. #
  9. #
  10. # convert epub to mobi
  11. #
  12. ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.mobi $OPTIONS
  13. #
  14. #
  15. # download news and save output to epub
  16. #
  17. #
  18. ebook-convert $MOBIPATH/$TODAY-orient.mobi $MOBIPATH/$TODAY-orient.epub
  19. #
  20. #
  21. # send book to kindle
  22. #
  23. 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 ""
  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 "ins@neS00n" --encryption-method SSL vortify-lc@algometic.com larry1chan11@kindle.com ""
  25. #
  26. # rm mobi file
  27. #
  28. rm $MOBIPATH/$TODAY-orient.mobi