Compare commits

...

2 Commits

View File

@ -49,20 +49,25 @@ class DocBookToEpub:
self.script_folder = os.path.dirname(self.own_path) + '/../' self.script_folder = os.path.dirname(self.own_path) + '/../'
print('Generating ePub with the following parameters:') print('Generating ePub with the following parameters:')
print(self.own_path) print(' own_path: %s' % self.own_path)
print(self.java_path) print(' java_path: %s' % self.java_path)
print(self.saxon_path) print(' saxon_path: %s' % self.saxon_path)
print(self.xsltproc_path) print(' xsltproc_path: %s' % self.xsltproc_path)
print(self.xslt_path) print(' xslt_path: %s' % self.xslt_path)
print(self.input) print(' input: %s' % self.input)
print(self.input_path) print(' input_path: %s' % self.input_path)
print(self.output) print(' output: %s' % self.output)
# Precompute paths that will be used later. # Precompute paths that will be used later.
self.output_dir = tempfile.mkdtemp().replace('\\', '/') 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) 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: if self.xslt_path is None:
self.xslt = self.script_folder + 'docbook/epub3/chunk.xsl' self.xslt = self.script_folder + 'docbook/epub3/chunk.xsl'
else: else: