blob: 78408d4fcdf9df964939ca54d454d262e0d8dd8e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#! /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|<SUB>1</SUB>|₁|g
s|<SUB>2</SUB>|₂|g
s|<SUB>3</SUB>|₃|g
s|<SUB>4</SUB>|₄|g
s|<SUB>5</SUB>|₅|g
s|<SUB>6</SUB>|₆|g
s|<SUB>7</SUB>|₇|g
s|<SUB>8</SUB>|₈|g
s|<SUB>9</SUB>|₉|g
s|<B>|[32m|g; s|</B>|[m|g
s|<I> </I>|<I>_</I>|g
s|<I>|[31m|g; s|</I>|[m|g
#s|<U>|[4m|g; s|</U>|[m|g
s|<U>||g; s|</U>||g
s|<|<|g
s|>|>|g
s@^ *@@
$s/$/\n/
'
|