Skip to content

Instantly share code, notes, and snippets.

Last active February 27, 2024 21:21
Show Gist options
  • Save mathiasrw/8710615 to your computer and use it in GitHub Desktop.
Save mathiasrw/8710615 to your computer and use it in GitHub Desktop.
Ever wanted to print your Trello board? Export as JSON and paste it into the code.
<!DOCTYPE html>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="" rel="stylesheet">
font-size: 1.2em;
<STYLE type="text/css" media="print">
<div id="out">
No Trello JSON data found
<script type="text/html" id="template-output" >
<h1>Område: {{name}}</h1>
<div class="panel panel-default">
<div class="panel-heading"><h4>{{name}}</h4>{{{desc}}}</div>
<!--div class="panel-body" >
<ul class="list-group">
<li class="list-group-item"><tt style="color:gray;">{{date}} </tt> {{{text}}}</li>
<script src=""></script>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript"></script>
<script src="
" type="text/javascript"></script>
<script type="text/javascript">
function eatData(trelloJson){
var data = {
lists: []
ref: {}
for(i in trelloJson.lists){
var list = trelloJson.lists[i]
data.ref[] = {
cards: []
for(i in{
var card =[i]
data.ref[] = {
desc: marked(card.desc)
actions: []
for(i in trelloJson.actions){
var action = trelloJson.actions[i]
if(action. type != "commentCard"){
data.ref[] = {
text: marked(
date: moment('YYYY-MM-DD')
} catch(e){}
return data;
function showData(data){
var template = $('#template-output').html()
$('#out').html(Mustache.render(template, data))
function autorun()
if(null == data){
return alert('Please insert JSON data from Trello in the code')
if (document.addEventListener) document.addEventListener("DOMContentLoaded", autorun, false);
else if (document.attachEvent) document.attachEvent("onreadystatechange", autorun);
else window.onload = autorun;
data = null;
data = {
"id": "52a9b37c0fc9b3",
"name": "My board",
"desc": "",
"descData": null,
"closed": false,
"idOrganization": "502a0988d99341fe81a",
"invited": false,
"pinned": false,
"starred": false,
"url": "",
Copy link

samrae commented Apr 28, 2016

This is excellent. Thanks so much. Is there a way I could hack this to process the JSON from just a card, rather than a board? I would find that really handy to keep archives of projects.

Copy link


Would be even better with option to import data directly from Trello site (HTTP GET) rather than having data as inline variable.

Copy link

I may be missing something, but where am I pasting the JSON data?

Copy link

very useful! thank you!

Copy link

Really Cool.
Well done!

Copy link

rustamli commented Sep 4, 2019


Copy link

arlyon commented Feb 26, 2020

I fixed this up with a drag-n-drop interface and put it on github pages:

Copy link

arlyon commented Sep 16, 2020

As an update, you can now just plop the url of any public board ^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment