Setting up a book authoring system

I like the ideas behind docbook (one source, many output formats etc.,). But figuring out how everything fits together was always couple of hours away from me. Brian O Sullivan's system gives a leg up on setting up a authoring environment. This system has proven to be rather popular with the readers. O'Reilly labs is using this publishing method for some of their new books including Programming Scala and Building iPhone apps with HTML, CSS and javascript

Docbook XML is used for marking up text. Django is used to provide paragraph level commenting capabilities.

These are the steps to set up a book authoring system using the same tools used to write Real World Haskell and Mercurial: the definitive guide. The excellent inline commenting system used in these two book sites now lives as Open Feedback Publishing System.

To get going with your own online book/tech manual you will need to install the required software.

$ sudo apt-get install docbook
$ sudo apt-get install graphviz
$ sudo apt-get install inkscape
$ sudo apt-get install docbook-xsl docbook-xml docbook-dsssl
$ sudo apt-get install sqlite3
$ sudo apt-get install libsqlite3-dev

Create a python environment

$ virtualenv --no-site-packages $HOME/bookmaker
$ source ~/bookmaker/bin/activate
$ easy_install django
$ easy_install pysqlite

Check out the source code and build

$ cd hgbook/en/
$ make
$ open en/html/index.html

Todo:

  • Setting up OFPS
  • Book writing workflow

§