[mapserver-dev] Typo fixing script in docs
Even Rouault
even.rouault at spatialys.com
Tue Feb 2 08:32:07 PST 2016
Hi,
I've added in a branch ( https://github.com/mapserver/docs/pull/143 ) an
interactive script ./scripts/fix_typos.sh that helps identifying common typo
fixes, and the fixes it helped finding. This uses the codespell Python script (
upstream is https://github.com/lucasdemarchi/codespell . Actual version is my
forked version with a few improvements ) that comes with its own dictionary.
I've also added the Debian Lintian dictionary and the QGIS dictionary. The
dictionaries are more code oriented than general purpose I guess, but there is
a good amount of computerese in our docs, so it is still valuable.
It requires Python 3 (and the first time it is run, git to download codespell
and curl to download the additional dictionaries)
You can use with : ./scripts/fix_typos.sh
and answering the question when a typo is identified.
A white list of words can be edited in ./scripts/fix_typos.sh itself, and when
a word is OK only in a specific context, you can add the full line to whitelist
in scripts/typos_whitelist.txt (sensitive to starting and trailing
whitespace/tabulations, and only work on LF terminated files, hence a
conversion of 2 files from CRLF to LF).
Note: it is only run on en/ files, the dictionaries being only for English.
Opinions ?
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the mapserver-dev
mailing list