diff options
author | V.Krishn <vkrishn4@gmail.com> | 2019-03-28 17:21:16 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2019-03-28 17:21:16 +0530 |
commit | 6d5e344e6ac80f2c23f89e38668bb5e18b87c9ac (patch) | |
tree | 77cc5b4b614927718ddbefd385a15f9d427322f2 /alpine | |
parent | 12a5d7e2034209be51e75f7db117dc3f6058324e (diff) | |
download | scripts-6d5e344e6ac80f2c23f89e38668bb5e18b87c9ac.tar.bz2 |
handle more quirks in names
Diffstat (limited to 'alpine')
-rw-r--r-- | alpine/irc/log/get-irclog.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/alpine/irc/log/get-irclog.sh b/alpine/irc/log/get-irclog.sh index 3b15733..6900d45 100644 --- a/alpine/irc/log/get-irclog.sh +++ b/alpine/irc/log/get-irclog.sh @@ -104,10 +104,12 @@ al_irclog2html() { lnames=$(awk '{print $3}' ${_CURRLF} | sort | uniq ) for name in ${lnames}; do _name=${name} - name=$(echo $name | sed 's|\[|\\[|g') # sed > v4.4 or busybox > v1.27 - name=$(echo $name | sed 's|\]|\\]|g') # ? # TODO + name=$(echo $name | sed -E 's|\[|\\[|g') # sed > v4.4 or busybox > v1.27 + name=$(echo $name | sed -E 's|\]|\\]|g') # ? # TODO + name=$(echo $name | sed -E 's|\^|\\^|g') + name=$(echo $name | sed -E 's/\|/\\|/g') # sed -E -i -e "s|${name}|__${num}${_name}|" ${_tmpf} - sed -E -i "s|^(2[0-9\-]+{9}) ([0-9\:]+{8}) ${name}|\1 \2 __${num}${_name}|" \ + sed -E -i "s|^(2[0-9\-]+{9}) ([0-9\:]+{8}) (${name})|\1 \2 __${num}\3|" \ ${_tmpf} num=$(($num+1)) done @@ -128,6 +130,7 @@ al_irclog2html() { # handle populous chatty channel if [ $num -gt 120 ]; then SVGColors="${SVGColors} ${SVGColors}"; fi if [ $num -gt 240 ]; then SVGColors="${SVGColors} ${SVGColors}"; fi + if [ $num -gt 480 ]; then SVGColors="${SVGColors} ${SVGColors}"; fi num=0 for color in ${SVGColors}; do |