Skip to content

Instantly share code, notes, and snippets.

@ramalho
Created November 9, 2011 18:47
Show Gist options
  • Save ramalho/1352485 to your computer and use it in GitHub Desktop.
Save ramalho/1352485 to your computer and use it in GitHub Desktop.
Generate report from pycon-pc JSON
import sys
import json
LINE_FORMAT = '{id:>3} {mark} {yay:>2} {nay:>2} {abstain:>2} {name}'
with open(sys.argv[1]) as json_in:
talks = json.load(json_in)
for talk in talks:
mark = {'rejected':'-', 'accepted': '+', 'poster': 'p'
}[talk['decision']]
talk.update(talk['votes'])
print LINE_FORMAT.format(mark=mark, **talk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment