From 61e310f3adfb7c6ac2f4037a4d03bd41dc179245 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Sat, 30 Oct 2021 07:53:48 +1100 Subject: [PATCH] Initial documentation. --- docs/development/spell-check.rst | 63 ++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/development/spell-check.rst diff --git a/docs/development/spell-check.rst b/docs/development/spell-check.rst new file mode 100644 index 0000000..a699b8e --- /dev/null +++ b/docs/development/spell-check.rst @@ -0,0 +1,63 @@ +Spell checking +============== + +Ultimately, some auto spell checking for relevant files (and even git commit +messages) would be awesome, but for now, we'll settle with manual install and +setup. + +Install +------- + +apt update +apt install aspell aspell-en + +Usage - non-interactive +----------------------- + +To get a list of words that the spellchecker doesn't recognise, first cd to the +appliance build code directory, then:: + + export COMMON=$FAB_PATH/common + cat changelog | aspell list -a \ + --encoding=utf-8 \ + --personal=$PWD/spelling/.dic \ + --add-extra-dicts=$PWD/spelling/dic \ + --add-extra-dicts=$COMMON/spelling/common.dic \ + --add-extra-dicts=$COMMON/spelling/common_changelog.dic \ + > MIS_SPELLED.changelog + + export COMMON=$FAB_PATH/common + cat README.rst | aspell list -a \ + --encoding=utf-8 \ + --personal=$PWD/spelling/.dic \ + --add-extra-dicts=$PWD/spelling/dic \ + --add-extra-dicts=$COMMON/spelling/common.dic \ + --add-extra-dicts=$COMMON/spelling/common_readme.dic \ + > MIS_SPELLED.readme + +Usage - interactive +------------------- + +It is suggested that you run the above and add any new words (that are spelled +right) to the spelling/dic (or one of the common dic files). Once you are ready +to interactively run through this, you can do it like this:: + + export COMMON=$FAB_PATH/common + aspell -c changelog \ + --dont-backup \ + --encoding=utf-8 \ + --personal=$PWD/spelling/.dic \ + --add-extra-dicts=$PWD/spelling/dic \ + --add-extra-dicts=$COMMON/spelling/common.dic \ + --add-extra-dicts=$COMMON/spelling/common_changelog.dic + + export COMMON=$FAB_PATH/common + aspell -c README.rst \ + --dont-backup \ + --encoding=utf-8 \ + --personal=$PWD/spelling/.dic \ + --add-extra-dicts=$PWD/spelling/dic \ + --add-extra-dicts=$COMMON/spelling/common.dic \ + --add-extra-dicts=$COMMON/spelling/common_readme.dic + +sort -f | uniq