Skip to content

Instantly share code, notes, and snippets.

@cgrusden
Created October 30, 2014 05:50
Show Gist options
  • Save cgrusden/7d1865ffb6d568d00d08 to your computer and use it in GitHub Desktop.
Save cgrusden/7d1865ffb6d568d00d08 to your computer and use it in GitHub Desktop.
Output trello json into Markdown format
require 'json'
json = JSON.parse(File.read("trello.json"))
json["lists"].each do |list|
puts "# #{list['name']}\n"
json["cards"].each do |card|
if card["idList"] == list["id"]
puts "## #{card['name']}\n"
json["checklists"].each do |chklist|
if chklist["idCard"] == card["id"]
puts "### #{chklist['name']}\n"
chklist["checkItems"].each do |item|
puts "* #{item['name']}"
end
puts "\n\n"
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment