#! /usr/bin/env bash
# TODO
# escape HTML characters
# slice by month as very long logs are problematic
# generalize for non supybot log
LOG_SOURCE=/home/utopiah/web/thelab/stigmergylive/logs/ChannelLogger/freenode/##pim/##pim.log
HTML_DEST=/home/utopiah/web/thelab/stigmergylive/logs/ChannelLogger/freenode/##pim/anchoredlog.html
echo "" > $HTML_DEST && cat $LOG_SOURCE | sed "s/[/" | sed "s/>/]/" | sed "s/\(.*\) \([*[].*\)/<\/a>\1<\/a> \2/" | sed "s/^/