docbook2epub: create the OEBPS and META-INF folders that Saxon seems unable to create.

This commit is contained in:
Thibaut Cuvelier 2024-11-11 23:43:34 +01:00
parent 92b656c17b
commit 637ae9528f

View File

@ -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: