Skip to content

Instantly share code, notes, and snippets.

@codingtony
Last active July 15, 2019 19:30
Show Gist options
  • Save codingtony/1a3fde5c700004b96c0a02dafd8d8565 to your computer and use it in GitHub Desktop.
Save codingtony/1a3fde5c700004b96c0a02dafd8d8565 to your computer and use it in GitHub Desktop.
Trello checklist backup with jq
#!/bin/sh
jq 'INDEX(.cards[]; .id) as $card | .checklists[] | { "card":$card[.idCard]|.name,"description":$card[.idCard]|.desc,"checklist":.name, "items": [.checkItems[] | (if .state=="incomplete" then .name +" [ ]" else .name + " [X]" end)]}' < $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment