Friday, February 15, 2013

PostgreSQL doc epub

The other day Peter Eisentraut made a small commit that was probably little noticed, but I think is very useful. He added a few lines to the documentation system to enable building the Postgres documentation as an epub document. This is really quite nice. The great advantage of epub documents over things like PDFs is that they are reflowable, so that they are adaptable to devices with a wide range of form factors. They are also typically much smaller than PDFs. So now I can put the PostgreSQL docs on my Ebook device. I can scale the font up if necessary and still have it look sane. And I can put the same file on an Android device, or an iPhone or iPad. There are free epub readers for almost every smart mobile device around. It won't work on a Kindle but you can convert it to Kindle format using some free software. There is also an epub plugin for Firefox. So this is cool.

6 comments:

  1. No way we can add support for .mobi format?

    ReplyDelete
    Replies
    1. Calibre can be used to convert from epub to mobi. It doesn't look like the docbook tools support native generation of mobi files.

      Delete
  2. This is AWESOME. Thanks for sharing!

    ReplyDelete
    Replies
    1. My joy may have been a little premature :)

      Perhaps this is a fairly noob question, but... to get the epub docs, how would someone that rarely builds PostgreSQL from source so about doing this? Meaning, does it require a full build from source?

      I had jumped to the (mistaken) assumption that we'd now be seeing ePub alongside HTML and PDF on www.postgresql.org/docs/manuals.

      Thanks!

      Delete
    2. Eventually we probably will. Meanwhile, for a sneak peek I have run these builds for both 9.2 and the deve docs and you can get the results from my bitbucket downloads at https://bitbucket.org/adunstan/pgdevel/downloads/postgres-9.2.epub and https://bitbucket.org/adunstan/pgdevel/downloads/postgres-dev.epub

      Delete
    3. I also added EPUB builds to Jenkins, if you want the latest and greatest: http://pgci.eisentraut.org/jenkins/job/postgresql_master_extradoc/lastSuccessfulBuild/artifact/doc/src/sgml/postgres.epub

      Delete