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):
|
def populate_article_metadata(self, article, soup, first):
|
||||||
header = soup.find('h3')
|
header = soup.find('h3')
|
||||||
self.log('header: ' + self.tag_to_string(header))
|
self.log('header: ' + self.tag_to_string(header))
|
||||||
pass
|
|
||||||
|
@ -227,7 +227,6 @@ def opf_metadata(opfpath):
|
|||||||
except Exception:
|
except Exception:
|
||||||
import traceback
|
import traceback
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def forked_read_metadata(original_path, tdir):
|
def forked_read_metadata(original_path, tdir):
|
||||||
|
@ -1830,7 +1830,6 @@ class OEBBook:
|
|||||||
self.spine.page_progression_direction = 'rtl'
|
self.spine.page_progression_direction = 'rtl'
|
||||||
except Exception:
|
except Exception:
|
||||||
raise
|
raise
|
||||||
pass
|
|
||||||
|
|
||||||
def clean_temp_files(self):
|
def clean_temp_files(self):
|
||||||
for path in self._temp_files:
|
for path in self._temp_files:
|
||||||
|
@ -342,7 +342,6 @@ cw<ci<font-style<nu<0
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.__list_table_final += line
|
self.__list_table_final += line
|
||||||
pass
|
|
||||||
|
|
||||||
def __found_override_table_func(self, line):
|
def __found_override_table_func(self, line):
|
||||||
self.__override_table_obj = override_table.OverrideTable(
|
self.__override_table_obj = override_table.OverrideTable(
|
||||||
|
@ -202,8 +202,7 @@ def main(args=sys.argv):
|
|||||||
parser = option_parser()
|
parser = option_parser()
|
||||||
opts, args = parser.parse_args(args)
|
opts, args = parser.parse_args(args)
|
||||||
oat = opts.open_at
|
oat = opts.open_at
|
||||||
if oat and not (
|
if oat and not (oat.startswith(('toc:', 'toc-href:', 'toc-href-contains:', 'epubcfi(/', 'ref:', 'search:', 'regex:')) or is_float(oat)):
|
||||||
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}')
|
raise SystemExit(f'Not a valid --open-at value: {opts.open_at}')
|
||||||
|
|
||||||
if not opts.new_instance and get_session_pref('singleinstance', False):
|
if not opts.new_instance and get_session_pref('singleinstance', False):
|
||||||
|
@ -1017,8 +1017,7 @@ class PythonHighlighter(QSyntaxHighlighter): # {{{
|
|||||||
self.setFormat(0, textLength,
|
self.setFormat(0, textLength,
|
||||||
self.Formats['error'])
|
self.Formats['error'])
|
||||||
return
|
return
|
||||||
if prevState == ERROR and \
|
if prevState == ERROR and not text.startswith(('>>>', '#')):
|
||||||
not (text.startswith(('>>>', '#'))):
|
|
||||||
self.setCurrentBlockState(ERROR)
|
self.setCurrentBlockState(ERROR)
|
||||||
self.setFormat(0, textLength,
|
self.setFormat(0, textLength,
|
||||||
self.Formats['error'])
|
self.Formats['error'])
|
||||||
|
@ -644,7 +644,6 @@ class CatalogBuilder:
|
|||||||
except:
|
except:
|
||||||
if self.opts.verbose:
|
if self.opts.verbose:
|
||||||
self.opts.log.error('pattern failed to compile: %s' % rule['pattern'])
|
self.opts.log.error('pattern failed to compile: %s' % rule['pattern'])
|
||||||
pass
|
|
||||||
elif field_contents is None and rule['pattern'] == 'None':
|
elif field_contents is None and rule['pattern'] == 'None':
|
||||||
if self.DEBUG:
|
if self.DEBUG:
|
||||||
_log_prefix_rule_match_info(rule, record, field_contents)
|
_log_prefix_rule_match_info(rule, record, field_contents)
|
||||||
|
@ -1108,7 +1108,6 @@ class BasicNewsRecipe(Recipe):
|
|||||||
article = self.feed_objects[f].articles[a]
|
article = self.feed_objects[f].articles[a]
|
||||||
except:
|
except:
|
||||||
self.log.exception('Failed to get article object for postprocessing')
|
self.log.exception('Failed to get article object for postprocessing')
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
self.populate_article_metadata(article, ans, first_fetch)
|
self.populate_article_metadata(article, ans, first_fetch)
|
||||||
return ans
|
return ans
|
||||||
|
@ -75,7 +75,15 @@ def serialize_recipe(urn, recipe_class):
|
|||||||
if rso:
|
if rso:
|
||||||
options = f' options={quoteattr(json.dumps(rso))}'
|
options = f' options={quoteattr(json.dumps(rso))}'
|
||||||
return (' <recipe id={id} title={title} author={author} language={language}'
|
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):
|
def serialize_collection(mapping_of_recipe_classes):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user