|
|
boxquote.filter - tgtimes - The Gopher Times |
|
|
 |
git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tgtimes (git://bitreich.org) |
|
|
 |
Log |
|
|
 |
Files |
|
|
 |
Refs |
|
|
 |
Tags |
|
|
 |
README |
|
|
|
--- |
|
|
|
boxquote.filter (1115B) |
|
|
|
--- |
|
|
|
1 #!/bin/sh |
|
|
|
2 |
|
|
|
3 export TERM=linux |
|
|
|
4 |
|
|
|
5 reset="$(echo -ne "\033[0m")" |
|
|
|
6 italicformat="$(echo -ne "\033[3m")" |
|
|
|
7 italicreset="$(echo -ne "\033[23m")" |
|
|
|
8 boldformat="$(echo -ne "\033[1m")" |
|
|
|
9 boldreset="$(echo -ne "\033[22m")" |
|
|
|
10 underlineformat="$(echo -ne "\033[4m")" |
|
|
|
11 underlinereset="$(echo -ne "\033[0m")" |
|
|
|
12 reverseformat="$(echo -ne "\033[7m")" |
|
|
|
13 reversereset="$(echo -ne "\033[27m")" |
|
|
|
14 |
|
|
|
15 redcolor="$(tput setaf 1)" |
|
|
|
16 greencolor="$(tput setaf 2)" |
|
|
|
17 yellowcolor="$(tput setaf 3)" |
|
|
|
18 bluecolor="$(tput setaf 4)" |
|
|
|
19 purplecolor="$(tput setaf 5)" |
|
|
|
20 cyancolor="$(tput setaf 6)" |
|
|
|
21 whitecolor="$(tput setaf 7)" |
|
|
|
22 darkgreycolor="$(tput setaf 8)" |
|
|
|
23 brightredcolor="$(tput setaf 9)" |
|
|
|
24 brightgreencolor="$(tput setaf 10)" |
|
|
|
25 brightyellowcolor="$(tput setaf 11)" |
|
|
|
26 brightbluecolor="$(tput setaf 12)" |
|
|
|
27 brightpurplecolor="$(tput setaf 13)" |
|
|
|
28 brightcyancolor="$(tput setaf 14)" |
|
|
|
29 brightwhitecolor="$(tput setaf 14)" |
|
|
|
30 |
|
|
|
31 while IFS= read -r line; |
|
|
|
32 do |
|
|
|
33 if [ -z "${line0}" ]; |
|
|
|
34 then |
|
|
|
35 line0="$(printf "%s\n" "${line}" \ |
|
|
|
36 | sed 's,^[# ]*\(.*\)$,\1,')" |
|
|
|
37 printf ",---- [${underlineformat} %s ${reset}]\n" \ |
|
|
|
38 "${line0}" |
|
|
|
39 else |
|
|
|
40 printf "| %s\n" "${line}" |
|
|
|
41 fi |
|
|
|
42 done |
|
|
|
43 |
|
|
|
44 printf "| \n" |
|
|
|
45 printf "\`----\n" |
|
|
|
46 |
|