![]() |
#1 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 70
Karma: 1800048
Join Date: Oct 2014
Device: BooX M96
|
Download all custom recipes (not only scheduled ones)
Hi is there a one click (or command line) way to manually download all custom recipes, without scheduling them for automatic download?
I see that if you go to schedule recipes, you can manually download them 1 by 1, is there a way to download them all at once? |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,364
Karma: 27230406
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It should be a simple three line script to download all custom recipes. Just iterate over the recipe files and call ebook-convert with them.
|
![]() |
![]() |
![]() |
#3 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 70
Karma: 1800048
Join Date: Oct 2014
Device: BooX M96
|
Quote:
I used your code from here: https://www.mobileread.com/forums/sh...d.php?t=179686 and just changed *.epub to *.recipe, and *.mobi to *.epub abd added a timestamp Code:
#!/usr/bin/python import os, time, glob, subprocess import datetime # get the date to add to caption and file name datetime.datetime.now().strftime("%Y-%m-%d") files = glob.glob('Armstrong Economics.recipe') workers = [] while files or workers: while len(workers) < 4 and files: f = files[0] files = files[1:] w = subprocess.Popen(['ebook-convert', f, os.path.splitext(f)[0]+'_'+datetime.datetime.now().strftime("%Y_%m_%d")+'.epub']) workers.append(w) for w in list(workers): if w.poll() is not None: workers.remove(w) time.sleep(0.1) and it works great :-) tx again jai ho Last edited by bobodude; 09-12-2019 at 11:57 AM. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto Retry if Scheduled download fail!!! | jardenman26 | Recipes | 3 | 06-21-2018 05:28 AM |
Auto Retry if Scheduled download fails | stevesout | Calibre | 1 | 03-14-2018 11:26 PM |
Guardian scheduled download failing | nickd | Recipes | 2 | 04-10-2011 04:35 AM |
scheduled download of periodicals | naskoboy | Library Management | 1 | 03-01-2011 05:40 PM |
Scheduled Custom News Recipes Disappear When Switching Libraries | Tegan | Calibre | 13 | 01-29-2011 07:21 AM |