Bug#652629: debian-reference: Please add epub support
Hi, I think you have done very good work around epub. (I still need to diget them.) On Fri, Nov 30, 2012 at 11:19:05AM +0100, Kacper Perschke wrote: Hi, I have made step towards the final desired solution using xmlto. On 29 November 2012 22:47, Kacper Perschke kacper.persc...@gmail.com wrote: Since xmlto is R-H standard tool, it is more used etc., I am looking solution along this. Can you? I'm attempting. Wil give the results when achieve. [...] Further research follows. Have sent patched format file /usr/share/xmlto/format/docbook/epub to Ondrej Vasik - current upstream developer of xmlto. Have submitted Debian Bug 694784 (http://bugs.debian.org/694784). Have tested the patch on english and russian version. Mentioned already stylesheet doesn't implicit proper css name from russian version xml, co the calling like xmlto --stringparam custom.css.source=maint-guide.css epub maint-guide.ru.dbk is a safer choice. Resulting ePUB is in my opinion quite readable one. I trust you here . (No time for me to check ...) Aiming to change upcoming wheezy package is difficult since we are under freeze but updating web page is still possible. I forgot how to update package list used for web page listing. Please contact people on debian-...@lists.debian.org to get how to get them updated. (I think you need to have package first so it is long shot.) Quickest way is to have local copy of required script within maint-guide and debian-referenve(quick-reference) VCS tree and Makefile use such script. It really depends how fast you wish these to be updated. Debian being very stability focused, it does take time to get things updated. In the mean time, let me focus on release critical bugs. Excuse me. Osamu Regards. KAcper -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
Hi Osamu, On 29 November 2012 15:30, Kacper Perschke kacper.persc...@gmail.com wrote: [...] Since xmlto is R-H standard tool, it is more used etc., I am looking solution along this. Can you? I'm attempting. Wil give the results when achieve. I have some steps forward in the investigation process. - xmlto does by default place call to maint-guide.css in the xhtml chunks when source is maint-guide.en.dbk. Is it default behaviour or configured? Don't know yet - xmlto uses --stringparam to set the xslt params. When we set the --stringparam custom.css.source=our_own.css then this call to this one will be placed in the xhtml. link rel=stylesheet type=text/css href=our_own.css/ - xmlto does not copy any of above css to the temporary directory that is then zipped to create epub So the css is absent in the final epub file, although it is properly called from xhtml chunks. - xmlto uses stylesheet http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl This is explicitly imported from Internet. e.g. in my experiment the call to xsltproc was /usr/bin/xsltproc --stringparam custom.css.source katz.css --nonet --xinclude --param passivetex.extensions '1' \ -o /home/kacper/Robocze/Osamu_Aoki/maint-guide-1.2.30/tmp/xmlto.GR0MFh/maint-guide.en.proc \ /home/kacper/Robocze/Osamu_Aoki/maint-guide-1.2.30/tmp/xmlto-xsl.fDwdXK \ /home/kacper/Robocze/Osamu_Aoki/maint-guide-1.2.30/maint-guide.en.dbk when the xmlto-xsl.fDwdXK had xsl:import href=http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl/ - Imported xsl stylesheet is a part of http://docbook.sourceforge.net/ project. Mentioned in this bug report dbtoepub is another native part of that project. This lets me to suppose that if dbtoepub is able to include css properly then xmlto may copy this solution from dbtoepub. Further research follows. KAcper -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
Hi, On Tue, Nov 27, 2012 at 07:40:01PM +0100, Kacper Perschke wrote: On 27 November 2012 14:23, Osamu Aoki os...@debian.org wrote: [...] Why not just build source simply by debuild. I have used debuild after Osamu gave me same advices about building environment for such action. Thanks! It will call debian/rules after few actions. It did and produced maint-guide.en.dbk among others build targets. Then I've invoked 'dbtoepub -c maint-guide.css maint-guide.en.dbk' and did got maint-guide.en.dbk.epub. Epubcheck Version 3.0b4 claimed a little bit about, but calibre[1] and Sony PRS650[2] are both able to use such file. I know it creates EPUB from my debian-reference experiment. I also checked now with Kobo. It is readable than PDF but everything is propotional font which breaks some ASCII art. Bold and Italics work. (This seems to be platform problem. Maybe, by installing mono font, it is fixed.) But it does not do META-INF/container.xml nor content.opf nor toc.ncx as I understand. These seem to be for compatibility with old equipment but xmlto support. These seem to exist in many publisged EPUBs. Do you know exact reason why these exist? Should I do some more investigations, or just try to insert it in to Makefile? If you add dbtoepub, we create Ruby dependency plus package install. If you figure out to add function to xmlto, then it is easier since this is shell script. Just because you can build locally is not good enough for Debian server ... Let's go slow a step by step. Or may be there exist completely different procedures I'm not aware. Since xmlto is R-H standard tool, it is more used etc., I am looking solution along this. Can you? Regards, Osamu [1] http://packages.debian.org/sid/text/calibre [2] http://en.wikipedia.org/wiki/Sony%20Reader -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
On 20 October 2012 11:13, Osamu Aoki os...@debian.org wrote: [...] I guess you used --skip-validation since it did not build. [...] Another my guess is that Hideki didn't validate because: kacper@zbiig:~/maint-guide-1.2.30$ xmlto epub docbook_ex.dbk xmlto: /home/kacper/maint-guide-1.2.30/docbook_ex.dbk does not validate (status 3) xmlto: Fix document syntax or use --skip-validation option validity error : no DTD found! Document /home/kacper/maint-guide-1.2.30/docbook_ex.dbk does not validate kacper@zbiig:~/maint-guide-1.2.30$ cat docbook_ex.dbk ?xml version=1.0 encoding=utf-8? article xmlns=http://docbook.org/ns/docbook; version=5.0 xml:lang=en titleSample article/title paraThis is a very short article./para /article KAcper -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
On Mon, Nov 26, 2012 at 07:50:13PM +0100, Kacper Perschke wrote: On 20 October 2012 11:13, Osamu Aoki os...@debian.org wrote: On Thu, Oct 18, 2012 at 10:54:04PM +0900, Hideki Yamane wrote: [...] I guess you used --skip-validation since it did not build. After getting main-guide source by 'apt-get source main-guide' I did try to validate 'xmlstarlet val -e maint-guide.en.dbk' and got warnings about unexpanded keys 'docversion;' and 'docisodate;' I see. I never used xmlstarlet but it needs to be configured to understand entity references: !ENTITY % common SYSTEM common.ent %common; !ENTITY % version SYSTEM version.ent %version; You need to do make version.ent first. I suppose that they are expanded while compiling but don't know how to reproduce it in my system yet. Why not just build source simply by debuild. It will call debian/rules after few actions. debian/rules script will eventually run make via following: override_dh_auto_build: dh_auto_build -- html txt pdf MANUAL=$(MANUAL) \ LANGS_EN=$(LANGS_EN) LANGS_PO=$(LANGS_PO) LANGS=$(LANGS) \ LANGS_NOPDF=$(LANGS_NOPDF) This is essentially the same as make html txt pdf MANUAL=$(MANUAL) \ LANGS_EN=$(LANGS_EN) LANGS_PO=$(LANGS_PO) LANGS=$(LANGS) \ LANGS_NOPDF=$(LANGS_NOPDF) But it is better to validate. I am fixing wrong markups first :-) It is almost as good to do make html :-) If you insist on validating, make validate should work ...oops except for English. For english, fix script or run it manually. $ xmllint --nonet --noout --postvalid --xinclude maint-guide.en.dbk maint-guide.en.dbk:38: element author: validity error : Element author content does not follow the DTD, expecting ((personname | (honorific | firstname | surname | lineage | othername | affiliation | authorblurb | contrib)+) , (personblurb | email | address)*), got (personname email contrib ) maint-guide.en.dbk:38: element personname: validity error : Element personname content does not follow the DTD, expecting (honorific | firstname | surname | lineage | othername)+, got (CDATA) maint-guide.en.dbk:39: element author: validity error : Element author content does not follow the DTD, expecting ((personname | (honorific | firstname | surname | lineage | othername | affiliation | authorblurb | contrib)+) , (personblurb | email | address)*), got (personname email contrib ) maint-guide.en.dbk:39: element personname: validity error : Element personname content does not follow the DTD, expecting (honorific | firstname | surname | lineage | othername)+, got (CDATA) maint-guide.en.dbk:610: element listitem: validity error : Element listitem content does not follow the DTD, expecting (calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | task | anchor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | indexterm | beginpage)+, got (literal) maint-guide.en.dbk:621: element listitem: validity error : Element listitem content does not follow the DTD, expecting (calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco | mediaobject | mediaobjectco | informalequation | informalexample | informalfigure | informaltable | equation | example | figure | table | msgset | procedure | sidebar | qandaset | task | anchor | bridgehead | remark | highlights | abstract | authorblurb | epigraph | indexterm | beginpage)+, got (literal) maint-guide.en.dbk:622: element listitem: validity error : Element listitem content does not follow the DTD, expecting (calloutlist | glosslist | bibliolist | itemizedlist | orderedlist | segmentedlist | simplelist | variablelist | caution | important | note | tip | warning | literallayout | programlisting | programlistingco | screen | screenco | screenshot | synopsis | cmdsynopsis | funcsynopsis | classsynopsis | fieldsynopsis | constructorsynopsis | destructorsynopsis | methodsynopsis | formalpara | para | simpara | address | blockquote | graphic | graphicco |
Bug#652629: debian-reference: Please add epub support
On 27 November 2012 14:23, Osamu Aoki os...@debian.org wrote: [...] Why not just build source simply by debuild. I have used debuild after Osamu gave me same advices about building environment for such action. Thanks! It will call debian/rules after few actions. It did and produced maint-guide.en.dbk among others build targets. Then I've invoked 'dbtoepub -c maint-guide.css maint-guide.en.dbk' and did got maint-guide.en.dbk.epub. Epubcheck Version 3.0b4 claimed a little bit about, but calibre[1] and Sony PRS650[2] are both able to use such file. Should I do some more investigations, or just try to insert it in to Makefile? Or may be there exist completely different procedures I'm not aware. KAcper [1] http://packages.debian.org/sid/text/calibre [2] http://en.wikipedia.org/wiki/Sony%20Reader -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
On 20 October 2012 11:13, Osamu Aoki os...@debian.org wrote: On Thu, Oct 18, 2012 at 10:54:04PM +0900, Hideki Yamane wrote: [...] I guess you used --skip-validation since it did not build. After getting main-guide source by 'apt-get source main-guide' I did try to validate 'xmlstarlet val -e maint-guide.en.dbk' and got warnings about unexpanded keys 'docversion;' and 'docisodate;' I suppose that they are expanded while compiling but don't know how to reproduce it in my system yet. But it is better to validate. I am fixing wrong markups first :-) Of course. I do agree. KAcper -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
Hi, On Thu, Oct 18, 2012 at 10:54:04PM +0900, Hideki Yamane wrote: On Thu, 18 Oct 2012 21:32:10 +0900 Osamu Aoki os...@debian.org wrote: I have bought an ereader ... so I now have some serious incentive for me to make epub. Now I see the reason. glad to hear that :-D I guess you used --skip-validation since it did not build. But it is better to validate. I am fixing wrong markups first :-) Osamu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
Hi, On Thu, Oct 18, 2012 at 06:11:47AM +0900, Hideki Yamane wrote: user debian-de...@debian.or.jp usertags 686032 debianjp thanks Hi, On Mon, 19 Dec 2011 23:24:14 +0900 Osamu Aoki os...@debian.org wrote: + -mkdir -p $(PUBLISHDIR) + xmlto --skip-validation epub $ Interesting. xhtml1.1 files zipped Is there any news for this wishlist bug, or should work more for appropriate implementation? I have bought an ereader ... so I now have some serious incentive for me to make epub. Now I see the reason. I have some problem about this source now (xml generation from asciidoc). I need to solve this problem first with some GNU related fix up in the main text. python 2.6-2.7 transition ??? Adding this feature is simple but I am not sure what the release manager thinks for now. Once I fix few things first, it will be first enabled for web download. then try to enable it for package. Osamu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
On Thu, 18 Oct 2012 21:32:10 +0900 Osamu Aoki os...@debian.org wrote: I have bought an ereader ... so I now have some serious incentive for me to make epub. Now I see the reason. glad to hear that :-D I have some problem about this source now (xml generation from asciidoc). I need to solve this problem first with some GNU related fix up in the main text. python 2.6-2.7 transition ??? Okay. Adding this feature is simple but I am not sure what the release manager thinks for now. Well, I think it relies on difference in its binary packages. Simply adding epub file doesn't harm any other packages. Once I fix few things first, it will be first enabled for web download. then try to enable it for package. It sounds good and enough for me, thanks -- Regards, Hideki Yamane henrich @ debian.or.jp/org http://wiki.debian.org/HidekiYamane -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
user debian-de...@debian.or.jp usertags 686032 debianjp thanks Hi, On Mon, 19 Dec 2011 23:24:14 +0900 Osamu Aoki os...@debian.org wrote: + -mkdir -p $(PUBLISHDIR) + xmlto --skip-validation epub $ Interesting. xhtml1.1 files zipped Is there any news for this wishlist bug, or should work more for appropriate implementation? -- Regards, Hideki Yamane henrich @ debian.or.jp/org http://wiki.debian.org/HidekiYamane -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Bug#652629: debian-reference: Please add epub support
Package: debian-reference Version: 2.47 Severity: wishlist Tags: patch -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Dear Maintainer, Please consider to add epub format support to debian reference. I've made a small patch, please check it. - -- Regards, Hideki Yamane -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCgAGBQJO7yshAAoJEF0yjQgqqrFAWqsQAJCIjT3hwTOiLZx8mtR9FkQi CmlDqkY/n3eNBaand+B/Tbe2oQh4tEwmgToHzD3Yxw/D39iIPnnie4jHpOzETv4g 9pewUoZWUloExDQnvpQg76OyxoblfprlNMYVTrYjCr9Oy7//hxitJv6iQfSePyg0 wPNbhpl/3ozemKAgBfTDG8M3xgGCN0WP1qxl3XLtYVecMK+aJNwSujsyv/BrlpUk WqY9pMu3IzBDNs+g+p0hEMYKEfN4EqbiV8Hj0cww2k6o59R7fEhaTwWjjs9YA5uV 3/Ds7VKYldTnH2WVOsWtXaY/cYcCS5jRy5OPhGbF1hjSUu+0pYIYHv8AqAGOaGJs +zNBF/HB20VPZu1TLSctIUx+TmI+gVUPr+HEqet6VN/EG1BvivWKf24j0YGCNdyy YfYmahjBlZu9mMH0y8Flxmi4TTPZKpPgf8lGoYVeLySBg9U59Y9IjOF4yYMp+F6I Ndb+4G4JrQrPkJRHCIuZtYk0zpvORCC6R+wh6hDeRAKcUr7LNXxwWN53rNf3fWev MiVQpVYCp9MoBYysFbeG0BIsAnCRGylGBzI2n0aA8i8dqcrkuc0sUWaVutM2AGe1 uPxP57850Q0d0Jq6RIuzXGCkTH+SSjQpP+RqOnaZawkogCl69aqQzGwJiZS2LA1B y374Cmqwy5jN95q4DsX7 =1DyM -END PGP SIGNATURE- diff -urN debian-reference-2.47/Makefile debian-reference-2.47.epub/Makefile --- debian-reference-2.47/Makefile 2011-11-23 02:35:51.0 +0900 +++ debian-reference-2.47.epub/Makefile 2011-12-16 22:50:26.541846589 +0900 @@ -87,6 +87,7 @@ all: $(MAKE) po $(MAKE) html css + $(MAKE) epub # Target for package building package: html txt css @@ -113,6 +114,7 @@ -rm -f $(addsuffix .xml, $(addprefix $(DOCNAME)., $(LANGPO))) -rm -f $(DOCNAME).en.xml -rm -f $(DOCNAME).en.xmlt header.txt + -rm -f $(DOCNAME).*.epub # Run distclean only for regenerating all locally cached data from remote # (and all raw XML from asciidoc for lenny@local) @@ -395,6 +397,12 @@ --param=monoseq.hyphenation=nohyphen \ --output=$@ - +.PHONY: epub +epub: $(foreach lang, en $(LANGPO), $(PUBLISHDIR)/$(DOCNAME).$(lang).epub) +$(PUBLISHDIR)/$(DOCNAME).%.epub: $(DOCNAME).%.xml $(SRC_ENT) + -mkdir -p $(PUBLISHDIR) + xmlto --skip-validation epub $ + ### # Build xml/html(indexed) for testing source (local)ALL ### diff -urN debian-reference-2.47/debian/control debian-reference-2.47.epub/debian/control --- debian-reference-2.47/debian/control 2011-11-23 02:35:51.0 +0900 +++ debian-reference-2.47.epub/debian/control 2011-12-16 22:51:06.545885945 +0900 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Osamu Aoki os...@debian.org Build-Depends: debhelper (= 8.0.0) -Build-Depends-Indep: w3m, xsltproc, docbook-xsl, docbook-xml, po4a, python, locales-all | locales, debiandoc-sgml, libxml2-utils +Build-Depends-Indep: w3m, xsltproc, docbook-xsl, docbook-xml, po4a, python, locales-all | locales, debiandoc-sgml, libxml2-utils, xmlto, zip Standards-Version: 3.9.2 Vcs-Svn: svn://svn.debian.org/svn/ddp/manuals/trunk/quick-reference Vcs-Browser: http://svn.debian.org/wsvn/ddp/manuals/trunk/quick-reference/
Bug#652629: debian-reference: Please add epub support
+ -mkdir -p $(PUBLISHDIR) + xmlto --skip-validation epub $ Interesting. xhtml1.1 files zipped Osamu -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org