parent
598a903aac
commit
96ca35b735
@ -0,0 +1,10 @@ |
||||
#! /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>" > $HTML_DEST && cat $LOG_SOURCE | sed "s/</[/" | sed "s/>/]/" | sed "s/\(.*\) \([*[].*\)/<a name=\"\1\"><\/a><a href=\"\/at\/\1\">\1<\/a> \2/" | sed "s/^/<p>/" | sed "s/$/<\/p>/" >> $HTML_DEST && echo "</html>" >> $HTML_DEST |
@ -0,0 +1,6 @@ |
||||
#! /usr/bin/env bash |
||||
|
||||
SOURCE_LOG=/home/utopiah/web/thelab/stigmergylive/logs/ChannelLogger/freenode/##pim/##pim.log |
||||
DEST_HTML=/home/utopiah/web/pim/links_fresh.html |
||||
|
||||
echo "<html>" > $DEST_HTML && cat $SOURCE_LOG | grep http: | sed -e "s/.*\(http\S*\).*/<a href=\"\1\">\1<\/a><br \/>/" | grep -v seedea.org > $DEST_HTML && echo "</html>" >> $DEST_HTML |
Loading…
Reference in new issue