Thursday, 27 January 2011

Spellchecking a Sphinx documentation project

These are notes to myself about how to set up a 'virtual environment' to spellcheck a Sphinx documentation project. If you haven't seen virtualenv before, it's really great for managing separate environments of Python packages:
C:\Python26\Scripts\easy_install virtualenv
C:\Python26\Scripts\virtualenv docspell --distribute
cd docspell
python Scripts\ Sphinx sphinxcontrib-spelling pyenchant
hg clone docs
cd docs
REM Add "sphinxcontrib.spelling" to the list of extensions in
sphinx-build -b spelling . _build > mispelling.txt

In a feeble effort to add some chemistry to this post, here is a meta joke about cheminformatics (scroll right for the answer):
Q. What does a cheminformatician do if you tell him a bad joke?                                                                  A. First he SMARTS, then he SMILES.
( contribution to the International Year of Chemistry :-)