From e8589f773a0c236ba08d56041515f5cfcfe87549 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 5 Feb 2020 02:35:39 -0300 Subject: Remove spelling/ --- spelling/check-spelling.sh | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 spelling/check-spelling.sh (limited to 'spelling/check-spelling.sh') diff --git a/spelling/check-spelling.sh b/spelling/check-spelling.sh deleted file mode 100755 index c9f03d2..0000000 --- a/spelling/check-spelling.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -HTML_DIR="${1:-}" -[[ -z "${HTML_DIR}" ]] && { - echo 'Undefined input HTML_DIR.' - exit 2 -} - -# Required by =sort= and =hunspell= -export LANG=C.UTF-8 - -for DICT in spelling/*.txt; do - diff <(sort "$DICT") "$DICT" || { - echo "The $DICT dictionary is unsorted. To fix it, run:" - echo " LANG=C.UTF-8 sort $DICT | sponge $DICT" - exit 1 - } -done - -cat spelling/*.txt > dicts.txt -check() { - html="$1" - echo "$1" - hunspell -l -p dicts.txt -d fr_FR -d en_US -i utf-8 "$html" | tee -a spelling.txt -} -export -f check -find "${HTML_DIR}" -type f -name '*.html' | grep -v pastebin | xargs -I{} bash -c "check {}" \; - -if [[ -s spelling.txt ]]; then - printf "\nvvv Mispelled words detected by hunspell.\n\n" - sort < spelling.txt | uniq - printf "\n^^^\n" - exit 1 -else - echo "No words mispelled" -fi -- cgit v1.2.3