[mapserver-dev] Typo fixing script in docs
Even Rouault
even.rouault at spatialys.com
Tue Feb 2 10:03:50 PST 2016
Le mardi 02 février 2016 18:48:53, Jeff McKenna a écrit :
> On 2016-02-02 1:35 PM, Jeff McKenna wrote:
> > On 2016-02-02 12:32 PM, Even Rouault wrote:
> >> 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
> >
> > Sounds great. When you get to documenting the steps (likely in
> > /development/documentation.txt) be sure to include steps for Windows
> > users as well, as many doc contributors are on Windows. Also, it would
> > be great to include steps for Python2 users, as I know the MS4W
> > environment was recently upgraded to Python 2.7.11 support. (yes I ask a
> > lot, but, you asked for my opinion :)
> >
> > Thanks!
> >
> > -jeff
>
> Maybe the answers to both of my questions/requests is to set this up on
> a shared server, and then document the steps to login and run.
I've documented the current process in en/development/documentation.txt .
Windows support is a bit out of scope for me. I've added some potential hints
on how to do that, but completely untested. Some requirements could
potentially be removed by doing a Python script instead of a shell script to
prepare the dictionaries, and the git step might be replaced by just
downloading the python script and its dictionary.
Python 2.X compat is unlikely unless someone downgrades codespell.
>
> -jeff
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the mapserver-dev
mailing list