Documentation Source Text

Check-in [d06b98415b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Simplified interface to aspell.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d06b98415beb41aa852c5845da955a9cd693aa24
User & Date: shaneh 2010-08-30 15:09:19
Context
2010-08-30
15:09
More updates to custom word list. check-in: 2bbdfeeb37 user: shaneh tags: trunk
15:09
Simplified interface to aspell. check-in: d06b98415b user: shaneh tags: trunk
13:36
Fix more spelling mistakes and typos. Additional changes for consistency in word usage. check-in: 9425bd7118 user: shaneh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to spell_chk.sh.

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44

45
46
  aspell --lang=en create master ./custom.rws < $3
fi
#
echo "Spell checking $1/$2 "
find $1 -name "$2" -print | grep -v matrix | while read file
do
  echo "Checking $file..."
  # this can probably be simplified
  cp $file x.html
  # in pipe mode, aspell doesn't like lines starting with some symbols
  sed 's/^[\#\~\+\!\&\@\*]/ /' < x.html > y.html
  # in pipe mode, difficult to count line numbers of blank lines
  sed 's/^\s*$/a/' < y.html > x.html
  # aspell appears to only support non-interactive spell checks in "pipe" mode (-a)
  lineno=0
  aspell --extra-dicts ./custom.rws --mode=html -a --suggest=false < x.html | while read f
  do
    # strip off first character of each returned line
    b=${f#?}
    c=${f%"$b"}
    # aspell returns a blank line after processing each line of input
    if [ "$c" = "" ]
    then
      lineno=`expr $lineno + 1`
    # aspell returns a line beginning with '#' if a word is mis-spelled
    elif [ "$c" = "#" ]
    then
      echo "$file: $lineno: $f"
    fi

  done
done







|
|
<
<
<
<
<
<
|

<
<
<
<
<
<
<
<
<
<
<
<
>


16
17
18
19
20
21
22
23
24






25
26












27
28
29
  aspell --lang=en create master ./custom.rws < $3
fi
#
echo "Spell checking $1/$2 "
find $1 -name "$2" -print | grep -v matrix | while read file
do
  echo "Checking $file..."
  # aspell's "list" option just lists all the misspelled words w/o any context.
  # we pass this list to grep to get line numbers.






  aspell --extra-dicts ./custom.rws --mode=html list < $file | sort | uniq | while read word
  do












    grep -H -n -o -E "\b$word\b" $file
  done
done