Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Recipes

Notices

Reply
 
Thread Tools Search this Thread
Old 09-12-2019, 09:17 AM   #1
bobodude
Connoisseur
bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.
 
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?
bobodude is offline   Reply With Quote
Old 09-12-2019, 09:26 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 34,884
Karma: 12571798
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.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-12-2019, 11:54 AM   #3
bobodude
Connoisseur
bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.bobodude ought to be getting tired of karma fortunes by now.
 
Posts: 70
Karma: 1800048
Join Date: Oct 2014
Device: BooX M96
Quote:
Originally Posted by kovidgoyal View Post
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.
Thanks again for your speedy answer,

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.
bobodude is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
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


All times are GMT -4. The time now is 06:55 AM.


MobileRead.com is a privately owned, operated and funded community.