mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use user specified output profile and base font size when downloading recipes in the GUI
This commit is contained in:
parent
edf5bcbab6
commit
24d76bd8a4
@ -152,10 +152,20 @@ def convert_bulk_ebook(parent, db, book_ids, out_format=None):
|
|||||||
|
|
||||||
def fetch_scheduled_recipe(recipe, script):
|
def fetch_scheduled_recipe(recipe, script):
|
||||||
from calibre.gui2.dialogs.scheduler import config
|
from calibre.gui2.dialogs.scheduler import config
|
||||||
|
from calibre.ebooks.conversion.config import load_defaults
|
||||||
fmt = prefs['output_format'].lower()
|
fmt = prefs['output_format'].lower()
|
||||||
pt = PersistentTemporaryFile(suffix='_recipe_out.%s'%fmt.lower())
|
pt = PersistentTemporaryFile(suffix='_recipe_out.%s'%fmt.lower())
|
||||||
pt.close()
|
pt.close()
|
||||||
recs = []
|
recs = []
|
||||||
|
ps = load_defaults('page_setup')
|
||||||
|
if 'output_profile' in ps:
|
||||||
|
recs.append(('output_profile', ps['output_profile'],
|
||||||
|
OptionRecommendation.HIGH))
|
||||||
|
lf = load_defaults('look_and_feel')
|
||||||
|
if lf.get('base_font_size', 0.0) != 0.0:
|
||||||
|
recs.append(('base_font_size', ps['base_font_size'],
|
||||||
|
OptionRecommendation.HIGH))
|
||||||
|
|
||||||
args = [script, pt.name, recs]
|
args = [script, pt.name, recs]
|
||||||
if recipe.needs_subscription:
|
if recipe.needs_subscription:
|
||||||
x = config.get('recipe_account_info_%s'%recipe.id, False)
|
x = config.get('recipe_account_info_%s'%recipe.id, False)
|
||||||
|
@ -48,7 +48,7 @@ class NYTimes(BasicNewsRecipe):
|
|||||||
ans = []
|
ans = []
|
||||||
allSectionKeywords = ['The Front Page', 'International','National','Obituaries','Editorials',
|
allSectionKeywords = ['The Front Page', 'International','National','Obituaries','Editorials',
|
||||||
'New York','Business Day','Sports','Dining','Arts','Home','Styles']
|
'New York','Business Day','Sports','Dining','Arts','Home','Styles']
|
||||||
excludeSectionKeywords = ['Sports','Dining','Styles']
|
excludeSectionKeywords = ['Dining','Styles']
|
||||||
|
|
||||||
|
|
||||||
# Find each instance of class="section-headline", class="story", class="story headline"
|
# Find each instance of class="section-headline", class="story", class="story headline"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user