Added spellcheck utility to documentation build

Uses the sphinxcontrib-spelling extension and requires PyEnchant and
aspell-en to be installed.

Adds the optional make target 'spelling' which produces the file
spelling/output.txt. It contains all words it detects.

Due to the large number of false positives, words in
utils/sphinx-config/false_positives.txt are ignored.
This commit is contained in:
Richard Berger
2017-03-05 21:23:41 -05:00
parent dd76ac5010
commit fc9eebb936
4 changed files with 2207 additions and 1 deletions

View File

@ -299,4 +299,11 @@ more information about the code and its uses.
epub_author = 'The LAMMPS Developers'
# configure spelling extension if present
import importlib.util
spelling_spec = importlib.util.find_spec("sphinxcontrib.spelling")
if spelling_spec:
extensions.append('sphinxcontrib.spelling')
spelling_lang='en_US'
spelling_word_list_filename='false_positives.txt'