Testing reStructredText Formatting

I was getting tired of pushing versions of reStructredText (RST) based README for Xpkg to GitHub that had bad formatting. RST formatting has a few little quirks that make it harder to use than it appears at first glance, particularly with nested lists.

The eventually correct answer is to use the rst2html.py program that is part of docutils. On Ubuntu it should just be called rst2html and installed with python-docutils package, so checking your doc is as simple as:

rst2html README.rst > README.html && xdg-open README.html

The first solution I actually came up with was a quick little utility that goes from RST to HTML. That is of course pointless given the docutils version, but I put it up in a GitHub gist for posterity:

Once you have pushed a bad version the GitHub interactive online editor, with it’s preview mode, is pretty good for a quick typo fix.