Skip to content

Instantly share code, notes, and snippets.

@hobbes3
Last active August 29, 2015 14:08
Show Gist options
  • Save hobbes3/e6f6ba9ce23f1a1e6000 to your computer and use it in GitHub Desktop.
Save hobbes3/e6f6ba9ce23f1a1e6000 to your computer and use it in GitHub Desktop.
hobbes3_sample solution props transforms onboarding
[hobbes3_sample]
# http://regex101.com/r/sJ2xP4/1
LINE_BREAKER = ([\r\n]+)(?:logger logger: \d{4}\/\d{2}\/\d{2}T\S+|$)
# Or you could do one crazy LINE_BREAKER without using any SEDCMD: http://regex101.com/r/sJ2xP4/4
# But then don't forget to update TIME_PREFIX to TIME_PREFIX = ^
TRUNCATE = 1000
SHOULD_LINEMERGE = False
# http://regex101.com/r/sK6yR6/2
TIME_PREFIX = logger logger:\s
TIME_FORMAT = %Y/%m/%dT%T%3N%z
MAX_TIMESTAMP_LOOKAHEAD = 28
# http://regex101.com/r/xL7dX2/2
SEDCMD-remove_prefix = s/logger logger: //
# http://regex101.com/r/xL7dX2/3
SEDCMD-remove_comments = s/[\r\n]+#.+//
# http://regex101.com/r/iR6fH2/2
EXTRACT-user = ^\S+ (?<user>\w+)
REPORT-fields = hobbes3_sample_bullets, hobbes3_sample_kv
[hobbes3_sample_bullets]
# http://regex101.com/r/aH9iK5/1
REGEX = (?m)^\s+- (?<bullets>[^\r\n]+)
MV_ADD = True
[hobbes3_sample_kv]
# http://regex101.com/r/jN9sJ9/1
REGEX = (?m)(?<_KEY_1>\w+): "(?<_VAL_1>.+?)"(?= \w+: |$)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment