index : logbot | |
Archlinux32 log bot | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-09 20:36:05 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-09 20:36:05 +0200 |
commit | a0be2ce2bfc03dbfd403cf81236fecffa16811e5 (patch) | |
tree | 4d2bfc150e2fcd9c387e2464df1334a6a8ec6724 | |
parent | 0d8a7030ff123c7197251f75415a44ce1de74bda (diff) |
-rwxr-xr-x | convert.sh | 13 |
@@ -32,10 +32,8 @@ create_color() { # "time * | nick action" # we reformat other formats accordingly -if [ "$1" = 'tyzoid' ]; then - shift - channel="$1" - shift +if [ "$2" = 'tyzoid' ]; then + channel="$3" sed ' s/^\[\([^]]\+\)] \*\*\* Joins: \(\S\+\) .*$/\1 --> | \2 has joined '"${channel}"' / t @@ -45,10 +43,8 @@ if [ "$1" = 'tyzoid' ]; then t d ' -elif [ "$1" = 'html' ]; then - shift - channel="$1" - shift +elif [ "$2" = 'html' ]; then + channel="$3" sed -n ' /^<font size="2">/{ s@^<font size="2">(\([^)]\+\))</font><b> @\1 @ @@ -89,7 +85,6 @@ elif [ "$1" = 'html' ]; then else cat fi | \ - sponge | \ sed ' s/([^()]*@[^()]*) // ' | \ |