Skip to content

Instantly share code, notes, and snippets.

@verlok
Last active July 1, 2020 10:01
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 verlok/3ea9b45701620c5d7faae74e95c6354e to your computer and use it in GitHub Desktop.
Save verlok/3ea9b45701620c5d7faae74e95c6354e to your computer and use it in GitHub Desktop.
Extract Trello card category, name and due date from Trello's first column
let out = [];
$(".list").first().find(".list-card-details").each((index, elem) => {
let $elem = $(elem);
let cardName = $elem.find(".js-card-name").text();
let cardCategory = $elem.find(".js-card-labels").text();
let cardDueDate = $elem.find(".js-due-date-text").text();
let dueDateString = (cardDueDate === "") ? "" : `(${cardDueDate})`;
out.push(`${cardCategory}: ${cardName} ${dueDateString}`);
});
out.join("\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment