mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-03-02 23:27:28 +01:00
oops
This commit is contained in:
parent
3ef78e8e1a
commit
65261cb53b
1 changed files with 4 additions and 2 deletions
|
|
@ -239,7 +239,7 @@ def __init__(self, book, path, dpi=166, width=575, height=747,
|
|||
max_link_levels=sys.maxint, link_level=0,
|
||||
is_root=True, baen=False, chapter_detection=True,
|
||||
chapter_regex=re.compile('chapter|book|appendix', re.IGNORECASE),
|
||||
link_exclude=re.compile('')):
|
||||
link_exclude=re.compile('$')):
|
||||
'''
|
||||
Convert HTML file at C{path} and add it to C{book}. After creating
|
||||
the object, you must call L{self.process_links} on it to create the links and
|
||||
|
|
@ -999,13 +999,15 @@ def process_file(path, options):
|
|||
header.append(' by ')
|
||||
header.append(Italic(options.author))
|
||||
book = Book(header=header, **args)
|
||||
le = re.compile(options.link_exclude) if options.link_exclude else \
|
||||
re.compile('$')
|
||||
conv = HTMLConverter(book, path, dpi=options.dpi,
|
||||
font_delta=options.font_delta,
|
||||
cover=cpath, max_link_levels=options.link_levels,
|
||||
baen=options.baen,
|
||||
chapter_detection=options.chapter_detection,
|
||||
chapter_regex=re.compile(options.chapter_regex, re.IGNORECASE),
|
||||
link_exclude=re.compile(options.link_exclude))
|
||||
link_exclude=re.compile(le))
|
||||
conv.process_links()
|
||||
oname = options.output
|
||||
if not oname:
|
||||
|
|
|
|||
Loading…
Reference in a new issue