Skip to content

Commit

Permalink
WIP - Spellcheck the Markdown files.
Browse files Browse the repository at this point in the history
Using GNU Aspell.  Next we need to create a dictionary of 'our allowed words' from the text file.
  • Loading branch information
jbampton committed Mar 12, 2020
1 parent 17bd30d commit d3ed36d
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
31 changes: 31 additions & 0 deletions check-spelling.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

errors=0
path="tests/spelling/"
mkdir -p $path
misspelled="$path"misspelled-words.txt
if [ -f $misspelled ] ; then
rm $misspelled
fi
for file in $(find . -name "*.md");
do
echo "$file" >> "$path"misspelled-words-temp.txt
aspell list --lang=en --encoding=utf-8 --personal=./.aspell.en.pws < "$file" | sort -u >> "$path"misspelled-words-temp.txt
if [ "$(wc -l <"$path"misspelled-words-temp.txt)" -ge 2 ]
then
echo >> "$path"misspelled-words-temp.txt
cat "$path"misspelled-words-temp.txt
cat "$path"misspelled-words-temp.txt >> "$path"misspelled-words.txt
errors=1
fi
:> "$path"misspelled-words-temp.txt
done
if [ -f "$path"misspelled-words-temp.txt ] ; then
rm "$path"misspelled-words-temp.txt
fi
if [ "$errors" -ge 1 ]
then
exit 1
else
exit 0
fi
71 changes: 71 additions & 0 deletions tests/spelling/misspelled-words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
./docs/reseller-hosting/dns.md
DNS

./docs/networking/win10v6.md
ICMPv
IPv
ProtoTypeICMPv
cirru
img
msc
png
wf

./docs/contact.md
ISP's
NOC

./docs/index.md
DNS
OPcache
cPanel
cpanel
opcache
php

./docs/cpanel-hosting/hosts-file.md
AAAA
DNS
IPv
Notepa
RunAsAdmin
StartMenu
cirru
cmd
exe
hostsfile
img
png
sys

./docs/cpanel-hosting/php-opcache.md
AppDynamics
OPcache
PHPs
Uncheck
bytecode
cPanel
cirru
htaccess
opcache
php
precompiled
runtime
zend

./docs/cpanel-hosting/index.md
cPanel

./docs/cpanel-hosting/email-settings.md
IMAP
SMTP
SettingsMenu
accountMenu
accountPOP
cPanel
cirru
hl
img
png
startmenu

0 comments on commit d3ed36d

Please sign in to comment.