-
-
Save pvojnisek/961db832188ef85ce43675221ba5a8f4 to your computer and use it in GitHub Desktop.
Convert the JSON file exported by Trello into Excel
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import simplejson, pandas | |
data = simplejson.loads(open('f877UwgO.json').read()) | |
data2=[] | |
to_del = ['attachments', | |
'badges', | |
'checkItemStates', | |
'closed', | |
'desc', | |
'descData', | |
'due', | |
'email', | |
'id', | |
'idAttachmentCover', | |
'idBoard', | |
'idChecklists', | |
'idLabels', | |
'idList', | |
'idMembers', | |
'idMembersVoted', | |
'idShort', | |
'manualCoverAttachment', | |
'pos', | |
'shortLink', | |
'subscribed', | |
'url', | |
] | |
for card in data['cards']: | |
for d in to_del: | |
if d in card: del card[d] | |
card['labels'] = ';'.join([lb['name'] for lb in card['labels']]) | |
data2.append(card) | |
df = pandas.DataFrame(data2) | |
df.to_excel('cards.xlsx') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Second version