From 919d075e00bee86482d8147a2c846539338d092f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 2 Jan 2017 22:19:22 +1300 Subject: Add chkl(6) --- .gitignore | 1 + Makefile | 5 +++-- games/chkl.sed | 6 ++++++ man/man6/chkl.6df | 32 ++++++++++++++++++++++++++++++++ share/chkl.sample | 5 +++++ 5 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 games/chkl.sed create mode 100644 man/man6/chkl.6df create mode 100644 share/chkl.sample diff --git a/.gitignore b/.gitignore index 110f8c4b..9450b710 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,7 @@ bin/unf bin/uts games/acq games/aesth +games/chkl games/drakon games/kvlt games/rot13 diff --git a/Makefile b/Makefile index 60fec019..20a4ae9e 100644 --- a/Makefile +++ b/Makefile @@ -112,6 +112,7 @@ clean distclean : bin/uts \ games/acq \ games/aesth \ + games/chkl \ games/drakon \ games/kvlt \ games/rot13 \ @@ -229,8 +230,8 @@ install-finger : install -pm 0644 -- finger/project "$(HOME)"/.project install -pm 0644 -- finger/pgpkey "$(HOME)"/.pgpkey -install-games : games/acq games/aesth games/drakon games/kvlt games/rot13 \ - games/strik games/zs check-games install-games-man +install-games : games/acq games/aesth games/chkl games/drakon games/kvlt \ + games/rot13 games/strik games/zs check-games install-games-man install -m 0755 -d -- "$(HOME)"/.local/games for name in games/* ; do \ [ -x "$$name" ] || continue ; \ diff --git a/games/chkl.sed b/games/chkl.sed new file mode 100644 index 00000000..40c35cee --- /dev/null +++ b/games/chkl.sed @@ -0,0 +1,6 @@ +#!/bin/sed -f +# Change an ASCII checklist with [/], [x], and [ ] boxes to a Unicode one +/^#/d +s_^\[ \]_☐_ +s_^\[/\]_☑_ +s_^\[[xX]\]_☒_ diff --git a/man/man6/chkl.6df b/man/man6/chkl.6df new file mode 100644 index 00000000..091ee9ed --- /dev/null +++ b/man/man6/chkl.6df @@ -0,0 +1,32 @@ +.TH CHKL 6df "January 2017" "Manual page for chkl" +.SH NAME +.B chkl +\- format an ASCII checklist with Unicode symbols +.SH USAGE +.B chkl +.br +[/] rekt +.br +[ ] not rekt +.br +^D +.SH DESCRIPTION +.B chkl +replaces ASCII approximations for checkboxes in ticked, crossed, or blank state +at the start of lines with appropriate Unicode symbols: +.IP ☐ 0.2i +Unicode Character 'BALLOT BOX' (U+2610) +.IP ☑ +Unicode Character 'BALLOT BOX WITH CHECK' (U+2611) +.IP ☒ +Unicode Character 'BALLOT BOX WITH X' (U+2612) +.P +Lines with a leading # will be ignored. +.SH SEE ALSO + +.br + +.br + +.SH AUTHOR +Tom Ryder diff --git a/share/chkl.sample b/share/chkl.sample new file mode 100644 index 00000000..63076fa7 --- /dev/null +++ b/share/chkl.sample @@ -0,0 +1,5 @@ +[/] sh +[ ] bash +[ ] ksh93 +[ ] pdksh +[x] zsh -- cgit v1.2.3