Skip to content

Instantly share code, notes, and snippets.

@EugeneLoy
Created Jan 19, 2018
Embed
What would you like to do?
Export cards from specific list in Trello (json) to csv
import json
import csv
LIST_NAME = "Backlog"
INPUT_FILE = "data.json"
OUTPUT_FILE = 'data.csv'
with open(INPUT_FILE) as jsonfile:
data = json.load(jsonfile)
for card_list in data["lists"]:
if card_list["name"] == LIST_NAME:
list_id = card_list["id"]
card_names = []
for card in data["cards"]:
if card["idList"] == list_id:
card_names.append(card["name"])
with open(OUTPUT_FILE, 'wb') as csvfile:
writer = csv.writer(csvfile)
for card_name in card_names:
writer.writerow([card_name])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment