upkindle.sh 1.0 KB

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. TODAY=`date +"%Y%m%d"`
  3. ROOTPATH=/config
  4. RECIPEPATH=$ROOTPATH/recipe
  5. MOBIPATH=$ROOTPATH/daily_news/oriental
  6. OPTIONS="--output-profile kindle_pw"
  7. echo $RECIPEPATH
  8. #
  9. # download oriental daily
  10. #
  11. #ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.mobi $OPTIONS
  12. #
  13. # download news and save output to epub
  14. #
  15. ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.epub
  16. #
  17. # convert epub to mobi
  18. #
  19. ebook-convert $MOBIPATH/$TODAY-orient.epub $MOBIPATH/$TODAY-orient.mobi $OPTIONS
  20. #
  21. # send book to kindle
  22. #
  23. #calibre-smtp --attachment $MOBIPATH/$TODAY-orient.mobi --relay smtp.gmail.com --port 587 --username cigarbar@gmail.com --password "on2next1" --encryption-method TLS cigarbar@gmail.com larry1chan@kindle.cn ""
  24. calibre-smtp --attachment $MOBIPATH/$TODAY-orient.mobi --relay hwsmtp.exmail.qq.com --port 465 --username sales@algometic.com --password "y6t8Fk^" --encryption-method SSL sales@algometic.com larry1chan@kindle.cn ""
  25. #
  26. # rm mobi file
  27. #
  28. rm $MOBIPATH/$TODAY-orient.mobi