This commit is contained in:
Kovid Goyal 2009-01-17 13:11:30 -08:00
commit e6b3565c81
2 changed files with 4 additions and 3 deletions

View File

@ -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
@ -56,4 +57,4 @@ def main(args=sys.argv):
return 0 return 0
if __name__ == '__main__': if __name__ == '__main__':
sys.exit(main()) sys.exit(main())

View File

@ -143,7 +143,7 @@ def warn(x):
class ReBinary(object): class ReBinary(object):
NSRMAP = {'': None, XML_NS: 'xml'} NSRMAP = {'': None, XML_NS: 'xml'}
def __init__(self, root, path, oeb, map=HTML_MAP): def __init__(self, root, item, oeb, map=HTML_MAP):
self.item = item self.item = item
self.logger = oeb.logger self.logger = oeb.logger
self.manifest = oeb.manifest self.manifest = oeb.manifest
@ -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)