NAME
typist - Curses-based typing tutor package
SYNOPSIS
typist [-d drill_tries] [--drill_tries=drill_tries] [-n] [--notimer] [-t] [--term_cursor] [-f curs_flash] [--curs_flash=curs_flash] [-c colo[u]rs] [--colo[u]rs=colo[u]rs] [-s] [--silent] [-q] [--quiet] [-w] [--nowpmode] [-l start_label] [--start_label=start_label] [ script_file ]
typist also accepts the -h, --help, -v and --version options.
The LINUX version understands both short form and long form command line options. Other versions understand only the short form options.
DESCRIPTION
typist is a curses-based interactive typing tutor program. It uses an input file, script_file, to create a series of typing tutorials, drills, and timed speed tests.
In a tutorial, typist simply presents a screen of information about the lessons.
There are two types of drill - one-time, and ordinary. In an ordinary drill, typist displays text on the screen, and waits for the user to correctly type the exact same text, underneath. It indicates typing errors, and if at the end of the exercise there were errors, it will re-run the drill, up to a maximum number of tries. In a one-time drill, the action is the same, except that the program will not repeat the drill if it is not typed correctly. Backspace and delete are not permitted in drills.
In a speed test, typist displays text on the screen, and waits for the user to correctly over-type the exact same text. It indicates typing errors, and at the end of the test it calculates the real and effective rate in WPM. A speed test is run only once, no matter how many errors there were. Backspace and delete are permitted, but errors still accumulate.
The top line of the screen displays a banner. The bottom line of the screen displays a message line, queries, and other status information. The lines in between are used for the tutorials, drills, and speed tests.
If script_file is not specified on the command line, a default file typist.typ will be used. The environment variable TYPIST_PATH is used when searching for script files; if the filename contains '/', TYPIST_PATH is ignored; otherwise, each component of the path in the variable is checked for the file (see ENVIRONMENT_VARIABLES below).
In typing speed reports, a 'word' is deemed to be five characters, so the raw (gross) WPM is the number of characters in the test passage, divided by five, then divided again by the number of minutes elapsed in typing the passage. The adjusted WPM factors in the errors; each error is counted as a word mistyped.
COMMAND LINE OPTIONS
typist understands the following command line options. Only the short form options are available in non-LINUX versions.
- -d, --drill_tries
-
Specifies the maximum number of drill tries permitted. When running through an ordinary typing drill, typist will not proceed past the drill until it is completed without errors, or until the number of tries exceeds drill_tries. The default value is 3, the minimum 1, and the maximum 1000. This value is ignored for one-time typing drills.
- -n, --notimer
-
typist will display the typing speeds in WPM after both drills and speed tests. However, the lessons appear to be written for a program that only does this for speed tests. To make typist behave in a manner that matches the lessons, that is, to suppress WPM reports on drills, use -n, --notimer.
- -t, --term_cursor
-
typist creates its own flashing block cursor on the screen, to help distinguish between the cursor and reverse video error indications. Setting -t or --term_cursor suppresses this, and forces the program to use the terminal's cursor instead.
- -f, --curs_flash
-
The curs_flash value sets the block cursor flash period in tenths of a second. A value of 0 indicates no cursor flashing. The default is 10, and the maximum is 512. This option is ignored if -t or --term_cursor has been set.
- -c, --colo[u]rs
-
In normal operation, typist uses only normal and reverse video attributes in monochrome mode. This option may be used to specify the foreground and background colours on terminals that support colours. The colours are specified as two integers, in the range 0 to 7, separated by commas, setting the foreground and background colours. The colour codes 0 to 7 indicate black, red, green, yellow, blue, magenta, cyan, and white respectively. The default colours string is 7,0 - white on black. The option is ignored if the terminal does not support colours.
- -s, --silent
-
When typist detects a typing error, it will beep the terminal. Use this option to silence the beep.
- -q, --quiet
-
Same as -s, --silent.
- -w, --nowpmode
-
By default, typist will try to mimic a word processor in certain ways when executing an exercise. It will treat space at the end of a line as a correctly typed character, and word wrap. It will treat return at the end of a line as a signal to move to the start of the next paragraph if applicable. It will compress multiple spaces into a single space. And it will skip over hyphens found at the end of a line. This option will turn off these word processor-like actions.
- -l, --start_label
-
Specifies the label in the script_file at which typist begins executing (see SCRIPT FILES AND COMMANDS below for information on labels). If start_label is not given, typist begins execution at the first line of the file.
SCRIPT FILES AND COMMANDS
typist reads in the data for its typing lessons from the script file. With the exception of comments and blank lines, each line in the file is of the format
-
command_char : command_data
Here, command_char is a single character code that defines an action for for typist to take, and command_data is data for that command. If command_char is a space character, this indicates that the line is a continuation of the preceding non-space command. The ':' separator must be in column two of the line.
Comment lines are lines beginning with a '!' character, and are ignored, as are blank lines. Comment lines may have any format provided that they begin with '!'; other lines must have the above format.
The following is a list of valid command_char values:
- B
-
This command clears the complete screen. If any command_data is present, this is displayed in the one-line banner at the top of the screen, and remains in place until the next B command. This command may not be continued; it is a single line command.
- *
-
This indicates a label in the file. The label may be the target of a G, Y, or N command. Labels may contain any character, including space, and are a single line command.
- T
-
This presents a tutorial, and is a multi line command, up to the available size of the curses screen. Each line in the command is simply printed to the screen. This command clears the screen beneath the top banner line.
- I
-
This presents some instructions to prefix a drill or speed test. At most two lines are permitted. It clears the screen beneath the top banner line.
- D
-
This creates an ordinary typing drill. It is a multi-line command; as many lines may be used as are available to curses.
- O
-
This creates a one-time typing drill. It is a multi-line command; as many lines may be used as are available to curses.
- P
-
This creates a speed test. It is a multi-line command; as many lines may be used as are available to curses.
- G
-
This causes typist to go to the label in command_data, and resume execution of the script there. This is a single line command.
- Q
-
This uses the message line at the bottom of the display to prompt the user for a Yes/No response. command_data is used as the query. Only the 'Y' and 'N' keys may be used to respond.
- Y
-
This is like G, except that the goto is executed only if the result of the last Q command was 'Y'.
- N
-
This is like G, except that the goto is executed only if the result of the last Q command was 'N'.
- K
-
This binds a function key to a label. The format of the data line following this command must be "fkey_number:label", where fkey_number is a function key number in the range 1 to 12, and label is a label to go to when this key is pressed. A value of NULL for label removes any label binding from the key. If function keys are not available on the terminal, Ctrl-<key> combinations can be used. On the top row of letter keys on the keyboard, the keys Ctrl-Q to Ctrl-P may be used as alternatives for F1 to F10, and on the second row of letter keys, Ctrl-A and Ctrl-S as alternatives for F11 and F12. This is also useful where function keys are intercepted by other programs, for example, a window manager.
- X
-
This command causes typist to exit. It is a single line command. Any command data is ignored.
ENVIRONMENT VARIABLES
typist uses the following environment variables:
- TYPIST_PATH
-
Lists the directories that the program will look in for script files. It has the standard format for paths, that is, a list of directories separated by ':'s. If the value of script_file contains '/', TYPIST_PATH is not used.
- TERM
-
Used by curses to manage the display.
- TERMINFO
-
This may need to be set if the path to the terminfo database is different between the system the binary was compiled on and the one it is being run on. For example, in older Slackware systems, the terminfo database resides in /usr/lib/terminfo. On RedHat Linux, it is in /usr/share/terminfo. If the program complains about the terminal type, and the value of TERM is correct, check into this.
SUPPLIED LESSONS
The following lessons are supplied with typist :
-
q.typ Quick QWERTY course (q1 - q5) r.typ Long QWERTY course (r1 - r14) t.typ QWERTY touch typing (t1 - t16) v.typ Yet Another QWERTY (v1 - v20) w.typ QWERTY Review (u1 - u13) d.typ Dvorak touch typing (d1 - d14) m.typ Typing drills (m1 - m11) s.typ Speed drills (s1 - s4) n.typ Calculator keypad (n1 - n3) combined.typ All of the above demo.typ A demonstration of features
The file typist.typ should be linked to one of these files. combined.typ would be a good one to choose.
EXAMPLES
To get the default set of typing lessons from a standard installation:
-
export TYPIST_PATH="/usr/local/lib/typist"
typist
To run the lessons in the file test.typ in /tmp, starting at label 'TEST1', using the terminal's cursor, and run silently:
-
typist -t -q -l TEST1 /tmp/test.typ
Here is a tiny example script to demonstrate the available commands:
-
! Minimal demonstration B: Typing tutor demonstration G:QDONE *:LOOP K:1:QDONE T:This is a small example tutor script. A better :example may be found in the demo.typ file that :accompanies Typist v2.2. I:Here is an example of a drill: D:asdf g h jkl; I:And here is an example of a speed test: P:qwe rt yu iop *:QDONE Q:Seen enough yet? [Y/N] N:LOOP X:
NOTES
The original typist program started out as a VAX BASIC program, and was first converted to IBM BASIC, and then again into a UNIX C/curses program. A number of small bugs appeared to have crept in during this process, both in the lessons and in the C program, and this eventually lead to a number of improvements - a rewrite of the C program for typist v2.2, and with it a redesign of the lesson file format to extend the features a little.
That said, the actual lessons themselves are essentially unchanged in this latest revision, the only edits being fixes in areas where it appeared that some tests got 'lost', and a couple of spelling corrections. One tutorial, for example, still refers to a long-dead terminal type; just think of these sorts of things as old world charm.
ERRORS AND OMISSIONS
typist does not go to much effort to minimise terminal output. In particular, the flashing block cursor can cause a lot of cursor movement. Using the terminal's own cursor will help if this becomes a problem.
In speed tests, the program does not allow backspacing or deletion past the beginning of the screen line, or back through Tab characters. This is purely to simplify screen updating.
typist is only designed to handle 7-bit printable ASCII characters. 8-bit and non-printing ASCII characters in lesson scripts may not be correctly handled. The drill and speed test functions have special problems with these characters.
Colour curses modes do not seem to work well with UnixWare. In particular, reverse video is not always rendered correctly on some terminal types, and xterms.
FILES
- /usr/local/lib/typist
-
The directory containing the lessons and demonstrations supplied with the program, if installed on the system. Set TYPIST_PATH to include this directory.
- typist.typ
-
The name of the default script file that typist tries to open if a script file is not explicitly given on the command line. If TYPIST_PATH is set then it will search this path for the file.
AUTHOR
Thanks to whoever was the author of the original DECUS VAX BASIC program, to D. Jason Penney for the initial conversion into UNIX C/curses, and to George Ferguson for posting it. Version 2.2 was created from the original UNIX C/curses version by Simon Baldwin <[email protected]>.