mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 11:14:02 +02:00
IGN:fixes to lit2oeb
This commit is contained in:
parent
aa6cba1e8e
commit
318de321f1
1 changed files with 2 additions and 2 deletions
|
|
@ -757,12 +757,12 @@ def extract_content(self, output_dir=os.getcwdu()):
|
|||
opf_path = 'content.opf'
|
||||
opf_path = os.path.join(output_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'))
|
||||
for entry in self.manifest.values():
|
||||
path = os.path.join(output_dir, entry.path)
|
||||
self._ensure_dir(path)
|
||||
with open(path, 'w') as f:
|
||||
with open(path, 'wb') as f:
|
||||
if 'spine' in entry.state:
|
||||
name = '/'.join(('/data', entry.internal, 'content'))
|
||||
f.write(self.get_markup_file(name).encode('utf-8'))
|
||||
|
|
|
|||
Loading…
Reference in a new issue