Skip to content

Instantly share code, notes, and snippets.

@ccxcz
Created May 24, 2019 13:28
Show Gist options
  • Save ccxcz/103ffe62513ddfb3f71fdf3b83389f38 to your computer and use it in GitHub Desktop.
Save ccxcz/103ffe62513ddfb3f71fdf3b83389f38 to your computer and use it in GitHub Desktop.
~/.lnav/formats/installed/profanity_log.json
{
"profanity_log" : {
"title" : "Profanity Log Format",
"regex" : {
"basic" : {
"pattern" : "^(?<timestamp>\\d{2}:\\d{2}:\\d{2}) - ([*](?<actionnick>[^: ]+)|(?<msgnick>[^*][^: ]+):) (?<body>.*)$"
}
},
"timestamp-format": "%H:%M:%S",
"ordered-by-time": true,
"value" : {
"actionnick" : {
"kind" : "string",
"identifier" : true
},
"msgnick" : {
"kind" : "string",
"identifier" : true
}
},
"sample" : [
{
"line" : "17:55:19 - SomeNick: it crashes when the user write a message"
}, {
"line" : "17:55:19 - *me dances around the room"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment