[Booki-dev] epub creation

Douglas Bagnall douglas at paradise.net.nz
Mon Sep 28 18:24:10 PDT 2009


OK, I have a script that makes epubs out of FLOSS Manuals books.

http://objavi.halo.gen.nz/epubjavi.cgi

It seems to work for most of our books. The documents are readable in
calibre and fbreader, and they pass my simple conformance tests, but
they almost certainly have flaws.  One that I know of is each chapter
starts with an <h1>, not an <h3> which makes sense and is conventional
for an epub (which I can fix).

Mike, I'm using you epub module with a couple of patches.  I've given
the Book object an optional content_dir parameter that determines where
the content goes within the zip.  It defaults to 'OEBPS/', but it was
convenient for me to put pages relative to the root (ie, content_dir = '').

Also, because FM books tend to have 2 level tables of contents (sections
and chapters), I had to write a new make_ncx, which copes with multiple
levels.  It is quite booki-centric in regard to the input it expects, so
I doubt it is ready for your module.  The NCX creation code begins about
here:

http://booki-dev.flossmanuals.net/git?p=espri.git;a=blob;f=epub.py;h=e52ddfe86f54cf570256505f800d06e7bf5897c4;hb=ba864afa959afd2e5b5b4d0e334c369530a4df26#l437

while the script that calls it (and your epub module) is

http://booki-dev.flossmanuals.net/git?p=objavi2.git;a=blob;f=epubjavi.cgi;h=c41f368ac4742e30fb0a0c2a6588cd5b8cb2b3f4;hb=HEAD

You might notice that these are in separate git repositories, which
reflects a bit of a tangle I have got into (actually there's a also
third (booki) and fourth (yours)) -- and which I will probably address
soon with a reorganisation.


Douglas




More information about the Booki-dev mailing list