Skip to content

Instantly share code, notes, and snippets.

@Quantium
Last active October 26, 2022 22:56
Show Gist options
  • Save Quantium/f236723c11aab176f9c3425c8ac6e807 to your computer and use it in GitHub Desktop.
Save Quantium/f236723c11aab176f9c3425c8ac6e807 to your computer and use it in GitHub Desktop.
Crete a Downloable CSV of all the repositories showed un the page of Bitbucket repos
const org = "organization"
const repos = document.querySelectorAll('[href^="/'+organization+'"]','[target="_self"])
const reposh =[]
for (let i = 0; i < repos.length; i++) reposh[i] = repos[i].href
const blob = new Blob([reposh], {type: "text/csv;charset=utf-8"});
const blobUrl = URL.createObjectURL(blob);
const link = document.createElement("a");
link.href = blobUrl;
link.download = "data.csv";
link.innerHTML = "Click here to download the file";
document.body.appendChild(link);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment