[812] in SIPB bug reports

home help back first fref pref prev next nref lref last post

idraw spell-checking script

daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Tue Dec 19 20:33:41 1989

Date: Tue, 19 Dec 89 20:33:40 -0500
From: Mark W. Eichin <eichin@ATHENA.MIT.EDU>
To: bug-sipb@ATHENA.MIT.EDU
This might be useful (I forward it since few people get the interviews
list and lots use idraw) should we put it in the locker and announce
it?
						_Mark_
From slc@RTI.RTI.ORG Tue Dec 19 20:04:41 1989
SUM: Lynn Cohen <slc@RTI.RTI.ORG>->interviews@interviews.stanford.edu
SUB: spell script for idraw figures

Here is a script that I use frequently to check the spelling
of text in an idraw  figure. I hope it is useful to you.

L. Cohen
-------cut here--------
#! /bin/sh 
## idrawspell -- locates text in an idraw postscript figure and
## pipes that text to the spell utility

AWK=/bin/awk
SPELL=/usr/bin/spell

case $# in
    0) echo "To run spell on the text in an idraw figure type:"
       echo "            `basename $0` file[s]"
       echo "at your prompt"
       ;;

    *) for i in $@
           do 
               ${AWK} '{if ($3 == "Text") 
                       {i = 0; texttrue = 1;}
                     if ( texttrue > 0 ) 
                       { i++;}
                     if ( (texttrue > 0) && ($1 == "]") )
                       {texttrue = 0;}
                     if ( (texttrue > 0) && ( i > 9 ) && ( $1 != "[") )
                       {print;}
               }' $i | ${SPELL}

           done
        ;;
esac


home help back first fref pref prev next nref lref last post