|
@@ -4,7 +4,9 @@ TODAY=`date +"%Y%m%d"`
|
|
|
ROOTPATH=/calibre
|
|
ROOTPATH=/calibre
|
|
|
RECIPEPATH=$ROOTPATH/recipe
|
|
RECIPEPATH=$ROOTPATH/recipe
|
|
|
MOBIPATH=/news
|
|
MOBIPATH=/news
|
|
|
|
|
+ARCHIVEPATH=/news
|
|
|
OPTIONS="--output-profile kindle_pw"
|
|
OPTIONS="--output-profile kindle_pw"
|
|
|
|
|
+DROPPATH=/webdav
|
|
|
echo $RECIPEPATH
|
|
echo $RECIPEPATH
|
|
|
#
|
|
#
|
|
|
#
|
|
#
|
|
@@ -22,10 +24,32 @@ ebook-convert $MOBIPATH/$TODAY-orient.mobi $MOBIPATH/$TODAY-orient.epub
|
|
|
# send book to kindle
|
|
# send book to kindle
|
|
|
#
|
|
#
|
|
|
#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 ""
|
|
#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 ""
|
|
|
-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 ""
|
|
|
|
|
-#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 ""
|
|
|
|
|
|
|
+#
|
|
|
|
|
+# commented out the next line instead use jailbroken koreader script to retrieve news (2026/8/8)
|
|
|
|
|
+# https://github.com/laxaurus/koreader-nextcloud-sync/blob/main/README.md
|
|
|
|
|
+#
|
|
|
|
|
+#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 ""
|
|
|
|
|
+#
|
|
|
|
|
+#
|
|
|
|
|
+# drop epub to webdav location for kindle koreader to pull (2026/8/14)
|
|
|
|
|
+#
|
|
|
|
|
+#
|
|
|
|
|
+ls $DROPPATH
|
|
|
|
|
+cp $MOBIPATH/$TODAY-orient.epub $DROPPATH/NEWS_$TODAY-orient.epub
|
|
|
|
|
+chmod 777 $DROPPATH/NEWS_$TODAY-orient.epub
|
|
|
|
|
+#install -m 777 $MOBIPATH/$TODAY-orient.epub $WEBDAV_PATH/NEWS_$TODAY-orient.epub
|
|
|
|
|
|
|
|
#
|
|
#
|
|
|
# rm mobi file
|
|
# rm mobi file
|
|
|
#
|
|
#
|
|
|
rm $MOBIPATH/$TODAY-orient.mobi
|
|
rm $MOBIPATH/$TODAY-orient.mobi
|
|
|
|
|
+#
|
|
|
|
|
+# archive old epubs
|
|
|
|
|
+#
|
|
|
|
|
+for f in $(find "$MOBIPATH" -maxdepth 1 -name "????????-orient.epub" -mtime +30); do
|
|
|
|
|
+ year=$(basename "$f" | cut -c1-4)
|
|
|
|
|
+ mkdir -p "$ARCHIVEPATH/$year"
|
|
|
|
|
+ mv "$f" "$ARCHIVEPATH/$year/"
|
|
|
|
|
+
|
|
|
|
|
+done
|
|
|
|
|
+
|