Edith Manual Filters 15th September 1994 A FILTER is a text based program (a TOS or TTP program) called by Edith. Up to 10 filters can be installed; they are activated by pressing ALTERNATE and a function key (from inside a TEXT WINDOW). PRE-PACKED FILTERS A number of useful filters is automatically installed by INSTALL.PRG and can be used straight away: Alt F1 CALCULATOR Select a numeric expression (e.g. 30 + 40 * 50) and hit Alt F1. A window pops up with the value of the expression. Alt F2 QUOTE Select a fragment of text and hit Alt F2. Every line is prefixed with '> '. This is especially useful for answering electronic mail. Alt F3 COLUMN-BASED SORTING Select a fragment of text (e.g. statistical data, addresses, etc.), and move the cursor to the beginning of the COLUMN you wish to sort the data on. (it doesn't matter on which line). Then hit Alt F3. Alt F4 REVERSE COLUMN-BASED SORTING Same, but reverse-sorting is applied. Alt F5 NUMERIC COLUMN-BASED SORTING Again the same, but the data are sorted on their value interpreted as double precision floating point numbers rather than alphabetically. Alt F6 TEXT INFO Provides information (bytes, number of words, etc.) about the selected text. Alt F7 SPELL Checks your spelling according to the included 'rudimentary' dictionary of English, and outputs any words which it thinks are incorrect in a new window. Alt F8 REMOVE DUPLICATE LINES Removes duplicate lines in the selected text. HOW TO INSTALL A FILTER To install a filter, select the name of a function key in the FILTERS dialog, and enter a name to identify its use (this is not strictly necessary). Then click on the 'CMD' field and select the filter in the file selector. Type its arguments, if any, in the ARGS field. These ARGUMENTS can contain arbitrary environment variables, and the following special tokens: $IN is expanded to the name of a file which contains the contents of the text selection when the filter was called. $OUT is expanded to the name of a file where EDITH expects text data which will be substituted for the text selection after termination of the filter $INOUT is expanded to the name of a file serving for passing both input and output selection. Especially useful for calling a VT52 based text editor like VI or EMACS. $ENTER when encountered causes an alert window to be opened where the user can type a string. The string is substituted in the command line. Useful for e.g. BANNER.TTP $SEL The contents of the first line in the selection, literally. $TTSIZE The true tab size of the text window $CURSCOL The current cursor column when the filter was called. When SELECTION TO STANDARD OUTPUT is selected, the text selection is sent to the keyboard input of the filter. When SUBSTITUTE STANDARD OUTPUT is selected, the terminal output of the filter will be substituted for the selection. When RUN FILTER OVER TEXT TERMINAL is selected, Edith will try to launch the program on a VT52 terminal. Under plain single tasking TOS, this means a white screen. Under GEMINI with the EDITH accessory, this means the Mupfel console. Under MultiTOS, this means the console. When FILTER OUTPUT TO NEW WINDOW is selected, a new, read only, window will be opened the first time a filter is called. From then on, all filter output will go into that window. NOTES ù Under MultiTOS, the console is used for the VT-52 terminal. See the printed manual for hints on how to automatically launch a console window when GEM is started. It is a problem that typing into the console window is a bit difficult (Gemini 2 has the same problem with the Mupfel console). ù Filters refuse to work when an application is started from Gemini 1.21. The accessory version is always OK. Gemini 2.0 works fine. IT IS NECESSARY that the command line caller EDITH.TTP is in one of the directories in $PATH, for Edith and the Gemini console to properly communicate. The command line caller is used to tell the Editress that the filter has terminated. OTHER EXAMPLES cmd: VI.TTP args: $INOUT over VT52. cmd: MUPFEL.TTP over VT52 cmd: BANNER.TTP args: $ENTER substitute standard output cmd: DATE.TTP substitute standard output cmd: AWK.TTP args: d:\awkscript\$ENTER selection to standard input substitute standard output Edith Manual Filters 15th September 1994