DocBook to ePub

Pavel Sanda sanda at lyx.org
Sat Feb 6 14:10:06 UTC 2021


On Sat, Feb 06, 2021 at 02:49:04PM +0100, Pavel Sanda wrote:
> Command to execute:
> "java" -jar "/home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar" Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl base.dir=/tmp/tmpnc1DfX
> docbook2epub fails
> sh: 1: java -jar /home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl base.dir=/tmp/tmpnc1DfX: not found
> Systemcall.cpp (291): Systemcall: 'python "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py" "java" "Intro.xml" "Intro.epub"' finished with exit code 1
> Error: Cannot convert file
> 
> Not sure what went wrong, but going to terminal I do not see /tmp/tmpnc1DfX created.
> Manually creating and running the java command leads to:

The problem is not nonexistent dir, but qoutation for command, that's fixed by
-    if os.system('"' + command + '"') != 0:
+    if os.system(command) != 0:

Now it continues by:
Command to execute:
"java" -jar "/home/lyx/lyx/devel/lib/scripts/../scripts/saxon6.5.5.jar" Intro.xml /home/lyx/lyx/devel/lib/scripts/../docbook/epub3/chunk.xsl base.dir=/tmp/tmp31wRYV
Generated ePub contents.
Writing /tmp/tmp31wRYV/OEBPS/toc.ncx for article
Traceback (most recent call last):
  File "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py", line 61, in <module>
    for file in glob.glob(output_dir + '/**/*', recursive=True):
TypeError: glob() got an unexpected keyword argument 'recursive'
Systemcall.cpp (291): Systemcall: 'python "/home/lyx/lyx/devel/lib/scripts/docbook2epub.py" "java" "Intro.xml" "Intro.epub"' finished with exit code 1
Error: Cannot convert file

I am not pythonist, so I leave an unexpected keyword argument 'recursive' to someone else. 

Pavel



More information about the lyx-devel mailing list