Created
January 4, 2014 18:32
-
-
Save gjlondon/8258749 to your computer and use it in GitHub Desktop.
Export Asana tasks to CSV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use Asana's "export project to JSON" function and copy-paste contents to an "asana_dump.js" file | |
import json | |
import csv | |
import pprint | |
pp = pprint.PrettyPrinter(indent=4) | |
f = json.load(open("asana_dump.js")) | |
with open('asana_dump.csv', 'w') as fp: | |
a = csv.writer(fp, delimiter=',') | |
data = [] | |
for task in f["data"]: | |
# choose conditions for inclusion and what fields you want to include in dump | |
if not task['completed']: | |
data.append([task['name'], task["due_on"]]) | |
a.writerows(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment