Skip to content

Instantly share code, notes, and snippets.

View SamsungGalaxyPlayer's full-sized avatar

Justin Ehrenhofer SamsungGalaxyPlayer

View GitHub Profile
#!/bin/sh
# Usage: format-irclog.sh <file>
# 1. Append two spaces to the end of each line.
# 2. Remove all characters before last `<`, e.g. `<matterbridge> <sgp> foo` becomes `<sgp> foo`.
# 3. Remove lines containing `⇐` (parts).
# 4. Remove lines containing `→` (joins).
# 5. Escape the `*` character, e.g. `*foo*` becomes `\*foo\*`.
# 6. Escape the `<` character, e.g. `<3` becomes `\<3`.