From bfa1b3a0783c6f56996c23bc6662ef597c405057 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Sun, 13 Dec 2020 01:09:46 +0100 Subject: Add manual (typ.1) --- Makefile | 4 ++++ typ.1 | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 typ.1 diff --git a/Makefile b/Makefile index cdcdd17..ee773d9 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,6 @@ typ: typ.c gcc -o $@ $< + +install: + install typ /usr/local/bin/ + install -m 644 typ.1 /usr/share/man/man1/ diff --git a/typ.1 b/typ.1 new file mode 100644 index 0000000..830b287 --- /dev/null +++ b/typ.1 @@ -0,0 +1,67 @@ +.Dd $Mdocdate$ +.Dt TYP section +.Os +.Sh NAME +.Nm typ +.Nd measure typing speed +.\" .Sh LIBRARY +.\" For sections 2, 3, and 9 only. +.\" Not used in OpenBSD. +.Sh SYNOPSIS +.Nm typ +.Sh DESCRIPTION +.Pp +.Nm +is a simple utility for measuring and analyzing typing speed. +It reads user input on the tty until a newline is encountered. +Then, it prints some useful statistics. +.Pp +.Nm +measures (among other things) +.Em seconds per word +rather than words per minute. +Unlike other timing utilities, time spent between words is not counted. +As a result, +.Nm +much more accurately measures the typist's raw typing rate, regardless of his +.Dq doubting +rate. +.Pp +.Nm +works when used in a pipe, as long as there is a tty available. +. +.Sh OUTPUT FORMAT +.Pp +.Nm +prints eight lines to standard output. +Each line consists of a number, a tab character and a short explanation. +.Bl -enum -offset indent +.It +total words typed +.It +total characters typed +.It +total characters typed inside words +.It +total seconds spent +.It +total seconds spent inside words +.It +average seconds spent per character +.It +average seconds spent per character inside word +.It +average seconds spent per word +.El +.Pp +To retrieve a specific number, you might use +.Xr sed 1 : +.Bd -literal -offset indent +typ | sed -n '7s/\\t.*//p' +.Ed +. +.Sh AUTHORS +.Pp +.Nm +is written by John Ankarström +.Aq Mt john (a) ankarstrom.se . -- cgit v1.2.3