Skip to content

Instantly share code, notes, and snippets.

@luser
Created May 14, 2018 20:33
Show Gist options
  • Save luser/87351343f2c36a3143de2b09a032d85f to your computer and use it in GitHub Desktop.
Save luser/87351343f2c36a3143de2b09a032d85f to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
import csv
import json
import sys
data = json.load(open(sys.argv[1], 'rb'))
all_data = sorted(((size, artifact, task) for (task, td) in data.iteritems() for (artifact, size) in td['artifacts']), reverse=True)
w= csv.writer(sys.stdout)
w.writerow(['Size', 'Artifact', 'Task Type'])
w.writerows(all_data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment