Updated documentation

This commit is contained in:
Aetnaeus
2020-12-24 18:06:00 -05:00
parent f05e461fd1
commit 439c1a80dc
2 changed files with 19 additions and 10 deletions

@ -33,20 +33,27 @@ Best served on a terminal with truecolor and cursor shape support (e.g kitty, it
# Usage
## Options
- `tt -n <num>` produces a test consisting of *num* randomly drawn english words
- `tt -csv -n <num>` outputs the csv formatted results to STDOUT
- `tt -csv` outputs the csv formatted results to STDOUT
Custom text can be supplied by piping aribirary text to the program.
The default behaviour is equivalent to 'tt -n 50'
E.G
- `shuf -n 40 /etc/dictionaries-common/words|tr '\n' ' '|fold -s -w 80|tt` produces a test consisting of 40 random words drawn from `/etc/dictionaries-common/words`.
Note that line breaks are exclusively determined by the input.
## Keys
- Pressing `escape` at any point restarts the test.
- `C-c` exits the test.
Custom text can be supplied by piping aribirary text to the program. Each paragraph
in the input is shown as a separate segment of the text.
E.G
- `shuf -n 40 /etc/dictionaries-common/words|tt` produces a test consisting of 40 random words drawn from `/etc/dictionaries-common/words`.
Note that line breaks are determined by the input if -raw is specified.
# Configuration
The theme can be configured by setting the following options in `~/.ttrc`:

8
tt.go

@ -84,13 +84,15 @@ func main() {
flag.Usage = func() {
fmt.Println(`Usage: tt [options]
By default tt creates a test consisting of 50 random words. Arbitrary text can also be piped directly into the program to create a custom test.
By default tt creates a test consisting of 50 random words. Arbitrary text
can also be piped directly into the program to create a custom test. Each
paragraph of the input is treated as a segment of the test.
E.G
shuf -n 40 /etc/dictionaries-common/words|tr '\n' ' '|fold -s -w 80|tt
shuf -n 40 /etc/dictionaries-common/words|tt
Note that linebreaks are determined exclusively by the input.
Note that linebreaks are determined exclusively by the input if -raw is specified.
Keybindings:
<esc> Restarts the test