Skip to content

Instantly share code, notes, and snippets.

@jacobian
Forked from lambacck/gist:1299684
Created October 20, 2011 21:51
Show Gist options
  • Save jacobian/1302487 to your computer and use it in GitHub Desktop.
Save jacobian/1302487 to your computer and use it in GitHub Desktop.
PyCon random review script
"""
Review you some talks!
Usage:
First::
$ pip install lxml
$ pip install -e git://github.com/jacobian/remotetable.git#egg=remotetable
Then log into us.pycon.org and enter in your session ID below.
Then ``python randomreviews.py`` and go to town.
"""
import remotetable
import random
import webbrowser
# Log in, then replace this with the value of your sessionid cookie.
SESSION_ID = 'XXX'
talks = remotetable.open('http://us.pycon.org/2012/review/list/',
request_cookies = {'sessionid': SESSION_ID},
parser = 'html',
row_css = 'table.review-list tr',
column_css = 'th, td'
)
unreviewed = [talk for talk in talks if talk['Rated'] == 'No']
random.shuffle(unreviewed)
while True:
next = unreviewed.pop()
print "Next up: #%s: %s" % (next['#'], next['Title'].split('\n')[0])
action = raw_input("Hit enter to review, 's' to skip, anything else to quit: ")
if action == '':
webbrowser.open('http://us.pycon.org/2012/review/%s/' % int(next['#']))
elif action.lower() == 's':
continue
else:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment