Created
May 27, 2012 22:34
-
-
Save aji/2816237 to your computer and use it in GitHub Desktop.
weelog -- easily convert chat logs formatted by weechat into a format more typical of IRC logs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
BEGIN { FS="\t"; } | |
{ | |
split($1, timesplit, / +/); | |
time = timesplit[2] | |
if (time == "") | |
time = "--:--:--"; | |
prefix = $2; | |
if (prefix !~ /^[\-><*]*$/) | |
prefix = sprintf("<%s>", prefix); | |
printf("[%s] %s %s\n", time, prefix, $3); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment