Files:
webspell is a shell script wrapper to ispell, necessary because ispell requires the HOME environment variable to be set, and setting env(HOME) doesn't seem to work from AOLserver Tcl. It takes two arguments, a filename to be spell checked and a dictionary file of extra words, one word per line.
The file ispell-words
is such a dictionary file. The table
ispell_words
contains the same information as ispell-words
, and is
kept to make the editing of ispell-words
easy. Any additions or
deletions are made to the table, then the entire file is regenerated
from the table.
One table:
To use:create table ispell_words ( ispell_word varchar(100) primary key );
Say you have a form as follows, and you want theMake sure that all scripts are executable and that the UNIX utilityemail_body
to be spellchecked when the user pushes Submit:Change the action to<form method=post action="email-send.tcl"> <input type=text name="email_to" size=30> <input type=text name="email_subject" size=40> <textarea name="email_body" rows=10 cols=50></textarea> <input type=submit value="Send"> </form>/tools/spell.tcl
and specify thevar_to_spellcheck
andtarget_url
as follows:The user will have the chance to correct any misspellings and then they'll be redirected, with all form variables intact, to the<form method=post action="/tools/spell.tcl"> <input type=hidden name="var_to_spellcheck" value="email_body"> <input type=hidden name="target_url" value="/fullpath/email-send.tcl"> <input type=text name="email_to" size=30> <input type=text name="email_subject" size=40> <textarea name="email_body" rows=10 cols=50></textarea> <input type=submit value="Send"> </form>target_url
.
ispell
is in /usr/local/bin/
. Also, the file
ispell-words
should contain the same words as the table
ispell_words
(it's fine if they both start out empty).
The lovely spell checker was written by Jin Choi (jsc@arsdigita.com) with some finishing touches by Eve Andersson (eveander@arsdigita.com).