mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
IGN:fixes to lit2oeb
This commit is contained in:
parent
aa6cba1e8e
commit
318de321f1
@ -757,12 +757,12 @@ class LitReader(object):
|
|||||||
opf_path = 'content.opf'
|
opf_path = 'content.opf'
|
||||||
opf_path = os.path.join(output_dir, opf_path)
|
opf_path = os.path.join(output_dir, opf_path)
|
||||||
self._ensure_dir(opf_path)
|
self._ensure_dir(opf_path)
|
||||||
with open(opf_path, 'w') as f:
|
with open(opf_path, 'wb') as f:
|
||||||
f.write(self.meta.encode('utf-8'))
|
f.write(self.meta.encode('utf-8'))
|
||||||
for entry in self.manifest.values():
|
for entry in self.manifest.values():
|
||||||
path = os.path.join(output_dir, entry.path)
|
path = os.path.join(output_dir, entry.path)
|
||||||
self._ensure_dir(path)
|
self._ensure_dir(path)
|
||||||
with open(path, 'w') as f:
|
with open(path, 'wb') as f:
|
||||||
if 'spine' in entry.state:
|
if 'spine' in entry.state:
|
||||||
name = '/'.join(('/data', entry.internal, 'content'))
|
name = '/'.join(('/data', entry.internal, 'content'))
|
||||||
f.write(self.get_markup_file(name).encode('utf-8'))
|
f.write(self.get_markup_file(name).encode('utf-8'))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user