#! /bin/sh
# usage: jbo WORDS...
set -euf
if test $# = 0; then
while read line; do
if test "${clear-}" = true; then
echo -n 'c'
fi
"$0" "$line"
done
exit
fi
echo "$*" |
tr 'h' "'" |
jbofihe -H |
tr '\n' ' ' |
sed -r '
s@?(HTML|HEAD|TITLE|BODY|FONT)[^>]*>@@g
s@Lojban translation@@
s|1|₁|g
s|2|₂|g
s|3|₃|g
s|4|₄|g
s|5|₅|g
s|6|₆|g
s|7|₇|g
s|8|₈|g
s|9|₉|g
s||[32m|g; s||[m|g
s| |_|g
s||[31m|g; s||[m|g
#s||[4m|g; s||[m|g
s|||g; s|||g
s|<|<|g
s|>|>|g
s@^ *@@
$s/$/\n/
'