From 31e458db3e49f3b1b3cd3da0cb179a4e85305a2b Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Tue, 28 Dec 2010 12:47:24 -0500 Subject: [PATCH] add some instructions and example output to the spelling readme --- spelling/README | 49 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/spelling/README b/spelling/README index 51b93d98..397998dd 100644 --- a/spelling/README +++ b/spelling/README @@ -9,16 +9,61 @@ showing misspelled words. Installation ============ -1. +1. Follow the instructions on the PyEnchant_ site to install enchant and then PyEnchant. +2. ``pip install sphinxcontrib-spelling`` Configuration ============= -1. +1. Add ``'sphinxcontrib.spelling'`` to the ``extensions`` list in ``conf.py``. + + :: + + extensions = [ 'sphinxcontrib.spelling' ] Configuration Options --------------------- +``spelling_show_suggestions`` + Boolean controlling whether suggestions for misspelled words are + printed. Defaults to False. +``spelling_lang`` + String specifying the language, as understood by PyEnchant and + enchant. Defaults to ``en_US`` for US English. +``spelling_word_list_filename`` + String specifying a file containing a list of words known to be + spelled correctly but that do not appear in the language dictionary + selected by ``spelling_lang``. The file should contain one word per + line. Refer to the `PyEnchant tutoral + `_ for + details. + +Running +======= + +To process a document with the spell checker, use ``sphinx-build`` and +specify ``spelling`` as the builder name using the ``-b`` option. The +output includes the headings from the document and any misspelled +words. If suggestions are enabled, they are shown on the same line as +the misspelling. + +:: + + $ sphinx-build -b spelling source output + + virtualenvwrapper + + Features + - "Plugin" + + Introduction + - "plugins" + + Details + + Installation + Supported Shells + - "bitbucket" .. _PyEnchant: http://www.rfk.id.au/software/pyenchant/