Ver código fonte

enhance recipe in calibre

larry 4 anos atrás
pai
commit
da2a3f1e48
2 arquivos alterados com 32 adições e 0 exclusões
  1. 3 0
      calibre/recipe/docker_upkindle.sh
  2. 29 0
      calibre/recipe/upkindle.sh

+ 3 - 0
calibre/recipe/docker_upkindle.sh

@@ -0,0 +1,3 @@
+#docker exec -it -u abc calibre  "/config/recipe/upkindle.sh" 
+docker exec  -u abc calibre  "/config/recipe/upkindle.sh" 
+

+ 29 - 0
calibre/recipe/upkindle.sh

@@ -0,0 +1,29 @@
+#!/bin/sh
+TODAY=`date +"%Y%m%d"`
+ROOTPATH=/config
+RECIPEPATH=$ROOTPATH/recipe
+MOBIPATH=$ROOTPATH/daily_news/oriental
+OPTIONS="--output-profile kindle_pw"
+echo $RECIPEPATH
+#
+# download oriental daily
+#
+#ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.mobi $OPTIONS
+
+#
+#  download news and save output to epub
+#
+ebook-convert "$RECIPEPATH/oriental_daily_pure.recipe" $MOBIPATH/$TODAY-orient.epub 
+#
+#  convert epub to mobi 
+#
+ebook-convert $MOBIPATH/$TODAY-orient.epub $MOBIPATH/$TODAY-orient.mobi $OPTIONS
+#
+#  send book to kindle
+#
+#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 ""
+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 ""
+#
+#  rm mobi file
+#
+rm $MOBIPATH/$TODAY-orient.mobi