Discussion:
[Docutils-users] EPub?
Matěj Cepl
2017-04-26 22:12:10 UTC
Permalink
How do people here generate EPub archives from their rST? I see
on http://docutils.sourceforge.net/docs/user/links.html#epub the
following three options, but I am not happy with either:

1. pandoc — I just do not like HTML it produces, it does not
support some rST constructs I want to use (..include) and it
cannot work with some other tools for rST.

2. rst2epub from https://bitbucket.org/wierob/rst2epub — the
last commit from 2013-05-12 and it shows. Seems to break on
non-ASCII titles (I am Czech, so it is point of no way for
me), and of course it does not seem to support ..include.

3. rst2epub2 from https://github.com/mattharrison/rst2epub2
— last commit 2016-05-06 and that was mine pull request ;).
Again, it does not seem to work with non-ASCII titles, it
requires some weird virtualenv, and I was not able to make it
working at all.

4. sphinx — I would prefer plain docutils simple HTML (or
HTML5), sphinx seems to do too much for me to like it
(specific stylesheets etc.), also it requires fixed structure
of source files (or it is too complicated to persuade it).

Which gets me back to my original thought: why isn’t some
rst2epub script part of docutils themselves? From looking to
pages like
https://www.thoughtco.com/create-epub-file-from-html-and-xml-3467282
, https://www.ibm.com/developerworks/xml/tutorials/x-epubtut/index.html
, or http://www.idpf.org/epub/301/spec/epub-contentdocs.html it
doesn’t seem to be THAT complicated. Although, do we have
support for generating XHTML?

Isn’t whole generating epub just stiching together HTML (which
we know how to generate, hopefully) with some metadata (which we
already have for generating ToC etc.)?

Best,

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All" t
Guenter Milde
2017-04-28 17:29:19 UTC
Permalink
Post by Matěj Cepl
How do people here generate EPub archives from their rST?
I don't know, actually.
Post by Matěj Cepl
Which gets me back to my original thought: why isn’t some
rst2epub script part of docutils themselves?
This is a long standing TODO issue (see docs/dev/todo.txt).
However, noone volunteered to to the work ...
Post by Matěj Cepl
From looking to pages like
https://www.thoughtco.com/create-epub-file-from-html-and-xml-3467282 ,
https://www.ibm.com/developerworks/xml/tutorials/x-epubtut/index.html
, or http://www.idpf.org/epub/301/spec/epub-contentdocs.html it
doesn’t seem to be THAT complicated. Although, do we have support for
generating XHTML?
Both html writers generate XML-compatible HTML.
There is also an XHTML1.1 writer in the sandbox.

The problem with epub is our CSS stylesheet that contains some code that is
not allowed in epub.
Post by Matěj Cepl
Isn’t whole generating epub just stiching together HTML (which
we know how to generate, hopefully) with some metadata (which we
already have for generating ToC etc.)?
Yes. It just needs to be done...

Günter


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use
Matěj Cepl
2017-04-28 19:25:15 UTC
Permalink
Post by Guenter Milde
The problem with epub is our CSS stylesheet that contains some
code that is not allowed in epub.
Is this somewhere documented? Do we have “Please, make EPub
production possible” ticket somewhere describing all problems
with it?

Best,

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Ple
Guenter Milde
2017-04-28 19:37:01 UTC
Permalink
Ahoi Matěj,
Post by Matěj Cepl
Post by Guenter Milde
The problem with epub is our CSS stylesheet that contains some
code that is not allowed in epub.
Is this somewhere documented?
Yes:
http://docutils.sourceforge.net/docs/dev/todo.html#epub-html-writer
Post by Matěj Cepl
Do we have “Please, make EPub
production possible” ticket somewhere describing all problems
with it?
No. Feel free to create one.

Günter


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "R
Matěj Cepl
2017-04-28 21:35:27 UTC
Permalink
Post by Guenter Milde
http://docutils.sourceforge.net/docs/dev/todo.html#epub-html-writer
I meant whether it is somewhere documented what are the problems
with CSS generated by rst2html5.

Matěj
--
https://matej.ceplovi.cz/blog/, Jabber: ***@ceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Of course I'm respectable. I'm old. Politicians, ugly buildings,
and whores all get respectable if they last long enough.
--John Huston in "Chinatown."


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply All"
Guenter Milde
2017-04-29 18:06:47 UTC
Permalink
Post by Matěj Cepl
Post by Guenter Milde
http://docutils.sourceforge.net/docs/dev/todo.html#epub-html-writer
I meant whether it is somewhere documented what are the problems
with CSS generated by rst2html5.
I don't know any other documentation about epub generation. This is an open
task.

The CSS is not "generated". Default CSS stylesheet are provided with the
HTML writers, the user is free to replace/supplement them with their own
stylesheet(s).

The problem with html4css1.css is the "! important" keyword.

There is no known problem with the CSS files used with the
html5 writer. They don't contain "! important" but were not tested with
epup-generating post-processors.



Günter


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Docutils-users mailing list
Docutils-***@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/docutils-users

Please use "Reply A

Loading...