Tuesday, October 05, 2010

Django documentation in epub format

I'm getting used to referring to technical documentation on the iPad and so I'm on the hunt for epub versions of things.

Daily my development is with Django and it was great to find that the documentation, which is built with Sphinx, can easily generate very nice epub output like this:

django epub.PNG

Here's how to generate your own:


pip install -U sphinx
svn co http://code.djangoproject.com/svn/django/trunk/ djangosvn
cd djangosvn/docs
make epub
Django.pngThe output is in _build/Django.epub which you then drag to iTunes to install on an iPad.

The only thing missing is a cover image.

For your convenience, I've stuck a copy here.

Update: built Python 2.7 doc as epub

After that success I had a shot at building the Python documentation. The sphinx that comes with the python source is old and doesn't include the epub builder so I used a separate sphinx. All seemed to go well:

epub build.png

Here's the command line:


sphinx-build -b epub -d build/doctrees . build/epub
python.pngFor your convenience I've put a copy here: Python 2.7 epub documentation. (That's a goo.gl shortened url by the way).

The output looks excellent on an iPad, it's 3,943 pages at normal font size and the iPad does groan a little but it is quite usable. epub is much much better than pdf for reading on tablets.

3 comments:

  1. Anonymous8:23 PM

    the post is very useful and save me a lot of time. thank you very much.

    ReplyDelete
  2. Anonymous8:19 PM

    Thanks a lot !

    ReplyDelete
  3. thank you very much, great material!

    ReplyDelete