Skip to content

steghoja/trello2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Trello2md -- Convert Trello JSON outputs to well-formed Markdown

Two scripts that:

  1. Preprocess the Trello JSON export to make it more friendly to parse. This script is based on RealOrangeOne's GIST and uses Python.
  2. Convert the friendly JSON into Markdown -- at least for some of the elements in the JSON. This script is based on IonicaBizau's node module Json2md.

Run

First, clone this repository. Second, make sure that trelloparse works as intended. Execute

sudo chmod +x trelloparse

to make the script executable. Then run it with

./trelloparse trello-export.json cards.json

where trello-export.json is the input file and cards.json is the output file. And, of course, you are free to substitute your filenames of choice.

Third, get trello2md.js to work. Install the json2md and the yargs dependencies:

npm install --save json2md
npm install --save yargs

You can then check if everything went according to plan by typing

node trello2md.js -h

which should show you usage instructions. The script expects the pre-processed JSON in cards.json. If you want to use a different filename, you can do so using the -f parameter:

node trello2md.js -f test.json

The markdown is then written to the console. If you want to rather have it in a file, just pipe it there!

Extension to Json2md

The Json2md node module in its current version expects a root node in the JSON construct. The Trello data does not quite look like that. To get the full output, you might need to change the file node_modules/json2md/lib/index.js as in this pull request.

Limitations

The trelloparse script does not extract all information from Trello cards, but only:

  • Name
  • Containing list
  • Description
  • Members
  • Labels
  • Checklists

Notably, it does not currently extract comments or attachments. Such things are relatively easy to add, though. Just see how the other elements are extracted and add your new element accordingly. Pull requests are welcome!

About

Two scripts to turn Trello JSON exports into Markdown

Resources

Stars

Watchers

Forks