mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
more misc recomendation (extra-edit)
This commit is contained in:
parent
ddfdc80d3a
commit
8dfbcaa057
@ -63,4 +63,3 @@ class TheCND(BasicNewsRecipe):
|
||||
def populate_article_metadata(self, article, soup, first):
|
||||
header = soup.find('h3')
|
||||
self.log('header: ' + self.tag_to_string(header))
|
||||
pass
|
||||
|
@ -227,7 +227,6 @@ def opf_metadata(opfpath):
|
||||
except Exception:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
pass
|
||||
|
||||
|
||||
def forked_read_metadata(original_path, tdir):
|
||||
|
@ -1830,7 +1830,6 @@ class OEBBook:
|
||||
self.spine.page_progression_direction = 'rtl'
|
||||
except Exception:
|
||||
raise
|
||||
pass
|
||||
|
||||
def clean_temp_files(self):
|
||||
for path in self._temp_files:
|
||||
|
@ -342,7 +342,6 @@ cw<ci<font-style<nu<0
|
||||
pass
|
||||
else:
|
||||
self.__list_table_final += line
|
||||
pass
|
||||
|
||||
def __found_override_table_func(self, line):
|
||||
self.__override_table_obj = override_table.OverrideTable(
|
||||
|
@ -202,8 +202,7 @@ def main(args=sys.argv):
|
||||
parser = option_parser()
|
||||
opts, args = parser.parse_args(args)
|
||||
oat = opts.open_at
|
||||
if oat and not (
|
||||
oat.startswith(('toc:', 'toc-href:', 'toc-href-contains:', 'epubcfi(/', 'ref:', 'search:', 'regex:')) or is_float(oat)):
|
||||
if oat and not (oat.startswith(('toc:', 'toc-href:', 'toc-href-contains:', 'epubcfi(/', 'ref:', 'search:', 'regex:')) or is_float(oat)):
|
||||
raise SystemExit(f'Not a valid --open-at value: {opts.open_at}')
|
||||
|
||||
if not opts.new_instance and get_session_pref('singleinstance', False):
|
||||
|
@ -1017,8 +1017,7 @@ class PythonHighlighter(QSyntaxHighlighter): # {{{
|
||||
self.setFormat(0, textLength,
|
||||
self.Formats['error'])
|
||||
return
|
||||
if prevState == ERROR and \
|
||||
not (text.startswith(('>>>', '#'))):
|
||||
if prevState == ERROR and not text.startswith(('>>>', '#')):
|
||||
self.setCurrentBlockState(ERROR)
|
||||
self.setFormat(0, textLength,
|
||||
self.Formats['error'])
|
||||
|
@ -644,7 +644,6 @@ class CatalogBuilder:
|
||||
except:
|
||||
if self.opts.verbose:
|
||||
self.opts.log.error('pattern failed to compile: %s' % rule['pattern'])
|
||||
pass
|
||||
elif field_contents is None and rule['pattern'] == 'None':
|
||||
if self.DEBUG:
|
||||
_log_prefix_rule_match_info(rule, record, field_contents)
|
||||
|
@ -1108,7 +1108,6 @@ class BasicNewsRecipe(Recipe):
|
||||
article = self.feed_objects[f].articles[a]
|
||||
except:
|
||||
self.log.exception('Failed to get article object for postprocessing')
|
||||
pass
|
||||
else:
|
||||
self.populate_article_metadata(article, ans, first_fetch)
|
||||
return ans
|
||||
|
@ -75,7 +75,15 @@ def serialize_recipe(urn, recipe_class):
|
||||
if rso:
|
||||
options = f' options={quoteattr(json.dumps(rso))}'
|
||||
return (' <recipe id={id} title={title} author={author} language={language}'
|
||||
' needs_subscription={needs_subscription} description={description}{options}/>').format(id=quoteattr(str(urn)), title=attr('title', _('Unknown')), author=attr('__author__', default_author), language=attr('language', 'und', normalize_language), needs_subscription=quoteattr(ns), description=attr('description', ''), options=options)
|
||||
' needs_subscription={needs_subscription} description={description}{options}/>').format(
|
||||
id=quoteattr(str(urn)),
|
||||
title=attr('title', _('Unknown')),
|
||||
author=attr('__author__', default_author),
|
||||
language=attr('language', 'und', normalize_language),
|
||||
needs_subscription=quoteattr(ns),
|
||||
description=attr('description', ''),
|
||||
options=options,
|
||||
)
|
||||
|
||||
|
||||
def serialize_collection(mapping_of_recipe_classes):
|
||||
|
Loading…
x
Reference in New Issue
Block a user