View Single Post
Old 12-02-2019, 02:33 AM   #1
Aoxd3p4
Junior Member
Aoxd3p4 began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2019
Device: kindle voyage
Thumbs up How to set [fetch news]-[delete downloaded nenws older than * days] with command line

I've got calibre server run with Command Line Interface in my VPS. And I add books from smart-phone-ereader that support opds.

So I write a crontab task to fetch news and automatic add them to calibredb.

Code:
re_path=/home/xxxx/calibre/

cd $re_path
for name in `ls newstoday.recipe|awk -F '.' '{print $1}'`
do
        echo "fetch news $name"
        ebook-convert ${name}.recipe .epub
        sleep 3
        echo "add $name to CalibreDB"
        calibredb add ${name}.epub
done
so everyday there would be more and more old news books, how can I make them deleted maybe every 6 days?

or How to set [fetch news]-[delete downloaded nenws older than * days] --the feature from GUI with command line


Thank you guys
Aoxd3p4 is offline   Reply With Quote