Skip to content

Instantly share code, notes, and snippets.

@pdurbin
Last active June 8, 2016 19:56
Show Gist options
  • Save pdurbin/5a98932c94055674278ebf47d241782e to your computer and use it in GitHub Desktop.
Save pdurbin/5a98932c94055674278ebf47d241782e to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import urllib2
import csv
import json
url = 'https://docs.google.com/spreadsheets/d/1t5sZiqTacunAXhfjcOnj4l81jNiCpswE8DlbVNqyKgU/export?gid=504231308&format=tsv'
def findIssueTitle(url):
text = urllib2.urlopen(url).read()
# FIXME: find cleaner solution than removing characters
title = str(text).split('<title>')[1].split('</title>')[0][:-27]
return title
data = []
reader = csv.DictReader(urllib2.urlopen(url), delimiter="\t")
for row in reader:
appdev = row['Application Development']
if appdev.startswith("x"):
print '- Requirement:', row['Requirement']
print '- Harvard Policy URL:', row['Harvard Policy URL']
print '- How Dataverse is meeting this requirement:', row['How Dataverse is meeting this requirement']
print '- Notes:', row['Notes']
print '- Action Type:', row['Action Type']
print '- GitHub Issue(s):'
issues = row['GitHub Issues']
for i in issues.split(','):
if i.isdigit():
print ' - ' + findIssueTitle('https://github.com/IQSS/dataverse/issues/' + i)
print '- Date Completed:', row['Date Completed']
print '\n---\n'
data.append(row)
#print json.dumps(data, indent=2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment