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
Scripts\activate
python Scripts\easy_install-2.6-script.py Sphinx sphinxcontrib-spelling pyenchant
hg clone https://bitbucket.org/baoilleach/openbabel-user-docs docs
cd docs
REM Add "sphinxcontrib.spelling" to the list of extensions in conf.py
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.
(...my contribution to the International Year of Chemistry :-)