Skip to content

Instantly share code, notes, and snippets.

View ansxor's full-sized avatar

Darien Reese ansxor

View GitHub Profile
-- Usage:
-- input chatlog files on stdin, outputs formatted logs on stdout
-- (name<tab>message\n), with all lines of multiline messages labelled with usernames
-- Pass a list of usernames to filter as arguments (optional)
-- iterator function, returns: name, message, room, time (in minutes)
function chatlines(file, ...)
local name, hour, minute, room
local names
if #{...}>0 then