Posted on by & filed under epub, tools.

Our Python script to convert from DocBook to ePub using the DocBook XSL has been updated to version 1.0.2.

I’ve added some command-line options to override the location of the DocBook XSL (previously it was stuck in a settings file) and to also point to an optional CSS file.

Usage: docbook1.xml [docbook2.xml]... --xsl [DocBook XSL or customization] --css 


9 Responses to “docbook2epub updated to version 1.0.2”

  1. Dave Pawson

    python install shows

    Installed /usr/lib/python2.6/site-packages/docbook2epub-1.0.1dev-py2.6.egg
    Processing dependencies for docbook2epub==1.0.1dev
    Searching for epubtools
    No local packages or download links found for epubtools
    Best match: None
    Traceback (most recent call last):
    File “”, line 30, in
    File “/usr/lib64/python2.6/distutils/”, line 152, in setup
    File “/usr/lib64/python2.6/distutils/”, line 975, in run_commands
    File “/usr/lib64/python2.6/distutils/”, line 995, in run_command
    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 76, in run
    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 104, in do_egg_install
    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 211, in run

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 427, in easy_install

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 478, in install_item

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 519, in process_distribution

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/”, line 563, in resolve
    distributions, errors = working_set.find_plugins(
    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/”, line 799, in best_match

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/”, line 811, in obtain
    raise TypeError(“Can’t add %r to environment” % (other,))
    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/command/”, line 434, in easy_install

    File “/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/setuptools/”, line 475, in fetch_distribution
    AttributeError: ‘NoneType’ object has no attribute ‘clone’

  2. Liza Daly

    Hi Dave,

    I’ve updated a newer version with some instructions:

    This package installs using setuptools. If you don’t have setuptools installed, run:

    $ python


    To install the package, first install epubtools, which should be bundled in the distribution zip file:

    $ cd epubtools
    $ python install

    Then set run the same thing in docbook2epub:

    $ cd docbook2epub
    $ python install

  3. Jacques Foucry


    Nice idea the README !

    I have a problem with my project. It seems that the images (png) are not copied into OEBPS/images…. Is it a “feature” or a bug ?

    Thanks in advance,

  4. Robert Nagle

    This sounds great.

    is there an easier way to feed the script multiple xml files? My docbook project uses xincludes and about a dozen xml files or more….

    I got it running once with index.xml in the vain hope it would traverse through the xincludes, but it did not.


  5. Liza Daly

    Hi Robert,

    Thanks, that’s definitely a bug. It ought to do xinclude parsing but you have to tell the XML parser to do that explicitly, and I’m not. I’ll release an updated version shortly.