mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-31 07:45:44 +00:00
ePub: use None instead of an empty string.
This commit is contained in:
parent
e95513c823
commit
bf976cb0ae
@ -31,9 +31,9 @@ class DocBookToEpub:
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
self.own_path = sys.argv[0]
|
self.own_path = sys.argv[0]
|
||||||
self.java_path = sys.argv[1] if sys.argv[1] != '' and sys.argv[1] != 'none' else ''
|
self.java_path = sys.argv[1] if sys.argv[1] != '' and sys.argv[1] != 'none' else None
|
||||||
self.xsltproc_path = sys.argv[2] if sys.argv[2] != '' and sys.argv[2] != 'none' else ''
|
self.xsltproc_path = sys.argv[2] if sys.argv[2] != '' and sys.argv[2] != 'none' else None
|
||||||
self.xslt_path = sys.argv[3] if sys.argv[3] != '' and sys.argv[3] != 'none' else ''
|
self.xslt_path = sys.argv[3] if sys.argv[3] != '' and sys.argv[3] != 'none' else None
|
||||||
self.input = sys.argv[4]
|
self.input = sys.argv[4]
|
||||||
self.output = sys.argv[5]
|
self.output = sys.argv[5]
|
||||||
self.script_folder = os.path.dirname(self.own_path) + '/../'
|
self.script_folder = os.path.dirname(self.own_path) + '/../'
|
||||||
@ -50,7 +50,7 @@ class DocBookToEpub:
|
|||||||
self.package_opf = self.output_dir + '/OEBPS/package.opf' # Does not exist yet,
|
self.package_opf = self.output_dir + '/OEBPS/package.opf' # Does not exist yet,
|
||||||
print('Temporary output directory: %s' % self.output_dir)
|
print('Temporary output directory: %s' % self.output_dir)
|
||||||
|
|
||||||
if self.xslt_path == '':
|
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:
|
||||||
self.xslt = self.xslt_path + '/epub3/chunk.xsl'
|
self.xslt = self.xslt_path + '/epub3/chunk.xsl'
|
||||||
@ -67,9 +67,9 @@ class DocBookToEpub:
|
|||||||
|
|
||||||
def start_xslt_transformation(self):
|
def start_xslt_transformation(self):
|
||||||
command = None
|
command = None
|
||||||
if self.xsltproc_path != '':
|
if self.xsltproc_path is not None:
|
||||||
command = self.start_xslt_transformation_xsltproc()
|
command = self.start_xslt_transformation_xsltproc()
|
||||||
elif self.java_path != '':
|
elif self.java_path is not None:
|
||||||
command = self.start_xslt_transformation_saxon6()
|
command = self.start_xslt_transformation_saxon6()
|
||||||
|
|
||||||
if command is None:
|
if command is None:
|
||||||
|
Loading…
Reference in New Issue
Block a user