[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#687106: Generate ebook (epub) version of the documentation?



Package: debian-edu-doc
Version: 1.3~20100508~5.0.4+edu1 
Tags: patch

Would it be an idea to create e-book versions of the documentation?
Given that we already have a docbook source, it can be easily created
using dbtoepub.  Here is a draft patch, modelled after the pdf rules.

Index: debian/control
===================================================================
--- debian/control      (revisjon 78080)
+++ debian/control      (arbeidskopi)
@@ -7,7 +7,8 @@
  ttf-arphic-gbsn00lp, ttf-arphic-bsmi00lp, ttf-wqy-zenhei,
  texlive-lang-cyrillic, texlive-lang-danish,  texlive-lang-spanish,
  texlive-lang-french, texlive-lang-german, texlive-lang-italian,
- texlive-lang-norwegian, imagemagick
+ texlive-lang-norwegian, imagemagick,
+ dbtoepub
 Maintainer: Debian Edu Developers <debian-edu@lists.debian.org>
 Uploaders: Holger Levsen <holger@debian.org>, 
  Andreas B. Mundt <andi.mundt@web.de>,
Index: documentation/common/Makefile.common
===================================================================
--- documentation/common/Makefile.common        (revisjon 78080)
+++ documentation/common/Makefile.common        (arbeidskopi)
@@ -5,6 +5,7 @@
 DESTPATH = /usr/share/doc
 LANGUAGES = `find . -name "$(name).*.po" | sed -e "s/.\/$(name).//" -e "s/.po//"`
 # Program name and option
+DBTOEPUB = dbtoepub
 XP = xsltproc --nonet --novalid --xinclude ../common/html.xsl
 DBLATEX = dblatex -T db2latex --backend=xetex --xsl-user=../common/user_param.xsl --xsl-user=../common/xetex_param.xsl -p ../common/pdf.xsl
 # that's ugly, smarter approach appreciated
@@ -66,6 +67,15 @@
        $(DBLATEX) $(name).$(LINGUA).xml --param=lingua=$(LINGUA)
 endif
 
+ifndef LINGUA
+epub:
+       $(DBTOEPUB) $(name).xml
+else
+epub:
+       po4a --translate-only $(name).$(LINGUA).xml po4a.cfg
+       $(DBTOEPUB) $(name).$(LINGUA).xml
+endif
+
 install: build
        # en needs to be first
        for f in en $(LANGUAGES) ; do \

-- 
Happy hacking
Petter Reinholdtsen


Reply to: