mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix break to any2lit.
This commit is contained in:
parent
7057fb8662
commit
a62c15cee0
@ -38,6 +38,7 @@ def any2lit(opts, path):
|
|||||||
os.mkdir(oebdir)
|
os.mkdir(oebdir)
|
||||||
opts.output = os.path.join(tdir, 'dummy.epub')
|
opts.output = os.path.join(tdir, 'dummy.epub')
|
||||||
opts.profile = 'None'
|
opts.profile = 'None'
|
||||||
|
opts.dont_split_on_page_breaks = True
|
||||||
any2epub(opts, path, create_epub=False, oeb_cover=True, extract_to=oebdir)
|
any2epub(opts, path, create_epub=False, oeb_cover=True, extract_to=oebdir)
|
||||||
opf = glob.glob(os.path.join(oebdir, '*.opf'))[0]
|
opf = glob.glob(os.path.join(oebdir, '*.opf'))[0]
|
||||||
opts.output = orig_output
|
opts.output = orig_output
|
||||||
|
@ -725,7 +725,7 @@ def oeb2lit(opts, inpath):
|
|||||||
outpath = os.path.basename(inpath)
|
outpath = os.path.basename(inpath)
|
||||||
outpath = os.path.splitext(outpath)[0] + '.lit'
|
outpath = os.path.splitext(outpath)[0] + '.lit'
|
||||||
outpath = os.path.abspath(outpath)
|
outpath = os.path.abspath(outpath)
|
||||||
context = Context('Firefox', 'MSReader')
|
context = Context('Browser', 'MSReader')
|
||||||
oeb = OEBBook(inpath, logger=logger)
|
oeb = OEBBook(inpath, logger=logger)
|
||||||
tocadder = HTMLTOCAdder()
|
tocadder = HTMLTOCAdder()
|
||||||
tocadder.transform(oeb, context)
|
tocadder.transform(oeb, context)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user