Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Grab your gistBox urls and associated labels into JSON
// Run this in the JS console, after logging into your GistBox
var gists = app.gists.models;
var data = [];
var i, ii, g, l;
for (i=0; i<gists.length; i++) {
gist = gists[i];
g = {};
g.id = gist.id;
g.url = gist.attributes.link_url;
g.labels = [];
l = {};
labelData = app.labelHelpers.getLabelsForGistId(gist.id);
for (ii=0; ii<labelData.length; ii++) {
g.labels.push(labelData[ii].name);
}
data.push(g);
}
JSON.stringify(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.