Skip to content

Instantly share code, notes, and snippets.

@dpatti
Created June 25, 2012 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpatti/2986952 to your computer and use it in GitHub Desktop.
Save dpatti/2986952 to your computer and use it in GitHub Desktop.
Trello Card CSV Bookmarklet
var url = document.location.href;
var match = url.match(/\/board\/.+?\/([0-9a-f]+)/);
if (match) {
$.get("/1/boards/" + match[1], { cards: 'all' }, function(resp){
var cardGroups = _.groupBy(resp.cards, function(i){ return i.idList; });
console.log(
_.map(_.values(cardGroups), function(i) {
return _.pluck(i, 'name').join(",")
}).join("\n")
);
}, 'json');
}
javascript:var url=document.location.href;var match=url.match(/\/board\/.+?\/([0-9a-f]+)/);if(match){$.get("/1/boards/"+match[1],{cards:'all'},function(resp){var cardGroups=_.groupBy(resp.cards,function(i){return i.idList;});console.log(_.map(_.values(cardGroups),function(i){return _.pluck(i,'name').join(",")}).join("\n"));},'json');}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment