Created
October 30, 2014 05:50
-
-
Save cgrusden/7d1865ffb6d568d00d08 to your computer and use it in GitHub Desktop.
Output trello json into Markdown format
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
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