Last active
October 26, 2022 22:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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