Skip to content

Instantly share code, notes, and snippets.

@beaugunderson
Last active December 23, 2015 18:49
Show Gist options
  • Save beaugunderson/6678409 to your computer and use it in GitHub Desktop.
Save beaugunderson/6678409 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2.7
import json
import sys
try:
log = json.loads(sys.stdin.read())
except:
print "Couldn't parse."
sys.exit(1)
for message in log:
try:
print "%s %s: %s" % (message["date"], message["from"]["name"],
message["message"])
print
except:
print "Couldn't print message from %s" % message["from"]["name"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment