Wikifying DocBook

December 2009


For serious documentation, I like DocBook. (For more info on how I create the AppNotes, see .) If other people need to be able to edit my docs, a Wiki is nice, like the LWP Wiki. Here's how to bridge the gap between the two.

[Note]Note

Mind you , the gap can be bridged from Docbook to Wiki, but there's loss of information, so the other way around is impossible

  1. From DocBook to XHTML

    That's described in .

  2. Converting XHTML to MediaWiki

    We need the html2wiki converter. Under Debian, it can be installed with sudo apt-get install libhtml-wikiconverter-mediawiki-perl. Now browse to where your XHTML is online, e.g. http://www.cs.rug.nl/~jurjen/ApprenticesNotes/ch26s09.html. Copy that URL, and then run the command:

    html2wiki --dialect=MediaWiki --base-uri=http://www.cs.rug.nl/~jurjen/ApprenticesNotes/ch26s09.html --wiki-uri=http://lwp-wiki.hosting.rug.nl ~/doc/generated/xhtml/ApprenticesNotes/ch26s09.html > /tmp/ch25s09.wiki

  3. Uploading the Wiki text

    First view the Wikified text with your favourite pager (less in my case), then copy the content, and paste it into the Wiki.

  4. Cleaning up

    You may want to clean a few broken links to nonexistent images off the page. Or then again you may not.