Skip to content

Instantly share code, notes, and snippets.

@brosner
Created January 21, 2009 20:47
Show Gist options
  • Select an option

  • Save brosner/50177 to your computer and use it in GitHub Desktop.

Select an option

Save brosner/50177 to your computer and use it in GitHub Desktop.
import csv
import urllib2
import urlparse
def get_project_issues(project):
r = urllib2.urlopen("http://code.google.com/p/%s/issues/csv" % project)
first = True
for row in csv.reader(r):
if first:
first = False
continue
if not row:
continue
yield row
def get_projects():
projects = []
raw_data = urllib2.urlopen("http://svn.pinaxproject.com/pinax/trunk/apps/external_apps/svn.externals").read()
for line in raw_data.split("\n"):
if line:
bits = line.split()
if not bits[0].startswith("#"):
yield urlparse.urlparse(bits[-1])[1].split(".")[0]
def main():
total = 0
for project in get_projects():
total += len(list(get_project_issues(project)))
print total
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment