diff options
author | V.Krishn <vkrishn4@gmail.com> | 2019-03-28 17:25:55 +0530 |
---|---|---|
committer | V.Krishn <vkrishn4@gmail.com> | 2019-03-28 17:25:55 +0530 |
commit | 9d5b9466f29afef692e1d4c6eb07c3133f5c4d19 (patch) | |
tree | 91ffec0c9acbd2fbeaadc2e0d5e8ea5bdafba626 | |
parent | 6d5e344e6ac80f2c23f89e38668bb5e18b87c9ac (diff) | |
download | scripts-0.07.tar.bz2 |
minor refactor, code cleanv0.07
-rw-r--r-- | alpine/irc/log/get-irclog.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alpine/irc/log/get-irclog.sh b/alpine/irc/log/get-irclog.sh index 6900d45..cfea8f8 100644 --- a/alpine/irc/log/get-irclog.sh +++ b/alpine/irc/log/get-irclog.sh @@ -99,7 +99,7 @@ al_get_irclog() { wget -c $file } -al_irclog2html() { +_al_irclog2html() { num=0 lnames=$(awk '{print $3}' ${_CURRLF} | sort | uniq ) for name in ${lnames}; do @@ -108,7 +108,6 @@ al_irclog2html() { 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}\3|" \ ${_tmpf} num=$(($num+1)) @@ -139,7 +138,10 @@ al_irclog2html() { sed -E -i -e "s|${str}<|style=\'color\:${color}\'\>\<|" \ ${_tmpf} done +} +al_irclog2html() { + _al_irclog2html _outf=$(echo ${_CURRLF} | cut -b2-).html # _outf=/path/to/htdocs/${_outf} |