[LyX/master] docbook2epub: create the OEBPS and META-INF folders that Saxon seems unable to create.
Thibaut Cuvelier
tcuvelier at lyx.org
Mon Nov 11 22:50:55 UTC 2024
commit 637ae9528fbb38f4ea426dcbfacfc1772f61d148
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Mon Nov 11 23:43:34 2024 +0100
docbook2epub: create the OEBPS and META-INF folders that Saxon seems unable to create.
---
lib/scripts/docbook2epub.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/scripts/docbook2epub.py b/lib/scripts/docbook2epub.py
index 5cd8593dbb..6e961e6147 100644
--- a/lib/scripts/docbook2epub.py
+++ b/lib/scripts/docbook2epub.py
@@ -60,9 +60,14 @@ class DocBookToEpub:
# Precompute paths that will be used later.
self.output_dir = tempfile.mkdtemp().replace('\\', '/')
- self.package_opf = self.output_dir + '/OEBPS/package.opf' # Does not exist yet,
+ self.package_opf = self.output_dir + '/OEBPS/package.opf'
print('Temporary output directory: %s' % self.output_dir)
+ os.mkdir(self.output_dir + '/OEBPS')
+ os.mkdir(self.output_dir + '/OEBPS/images')
+ os.mkdir(self.output_dir + '/META-INF')
+ print('Created the folder structure')
+
if self.xslt_path is None:
self.xslt = self.script_folder + 'docbook/epub3/chunk.xsl'
else:
More information about the lyx-cvs
mailing list