DocBook to ePub

Thibaut Cuvelier tcuvelier at lyx.org
Sun Feb 7 00:57:03 UTC 2021


On Fri, 5 Feb 2021 at 17:57, Kornel Benko <kornel at lyx.org> wrote:

> Am Thu, 4 Feb 2021 23:21:30 +0100
> schrieb Thibaut Cuvelier <tcuvelier at lyx.org>:
>
> ...
> >
> > If you want to try it outside LyX, first export the document as DocBook 5
> > (say, doc.xml); if Java is available in the PATH, run (with either
> Python 2
> > or 3, although it's only really tested with 3.8):
> >
> > python scripts/docbook2epub.py "java" "doc.xml" "doc.epub"
>
> I get here:
> Traceback (most recent call last):
>   File "/usr2/src/lyx/lyx-git/lib/scripts/docbook2epub.py", line 26, in
> <module>
>     own_path, java_path, input, output = sys.argv
> ValueError: need more than 3 values to unpack
>
> from python 2.7.17 and also from python 3.6.9
>
> > Otherwise, you should have many more details by having a look at the
> > console, if one is attached to the LyX process.
> >
> > Mostly, there are two sources of error: either the transformation into
> HTML
> > or the ZIP-archive creation. Basically, the script is just running the
> > following three commands:
> >
> > mkdir …/tmpfolder
> > java -jar …/saxon6.5.5.jar …/doc.xml …/docbook/epub3/chunk.xsl
> > base.dir=…/tmpfolder
>
> This one works. I get
>
> Writing /fd/OEBPS/bk01-toc.xhtml for book
> Writing /fd/OEBPS/ch01.xhtml for chapter
> Writing /fd/OEBPS/pt01.xhtml for part
> Writing /fd/OEBPS/ch02.xhtml for chapter
> Writing /fd/OEBPS/pt02.xhtml for part
> Writing /fd/OEBPS/index.xhtml for book
> Writing /fd/OEBPS/docbook-epub.css for book
> Generating EPUB package files.
> Generating image list ...
> Writing /fd/OEBPS/package.opf for book
> Writing /fd/OEBPS/../META-INF/container.xml for book
> Writing /fd/OEBPS/../mimetype for book
> Generating NCX file ...
> Writing /fd/OEBPS/toc.ncx for book
> <?xml version="1.0" encoding="UTF-8"?>
>
>
> > zip …/doc.epub …/tmpfolder/*
>

I've just pushed a path for this issue.

(Pavel, I'm having a look at your messages.)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210207/14dcda7b/attachment.html>


More information about the lyx-devel mailing list