Created
October 21, 2022 04:01
-
-
Save kwbtdisk/606daaa0c7f98d45c8b2d7cab83995a2 to your computer and use it in GitHub Desktop.
Export github project table view into CSV javascript
This file contains hidden or 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
// Execute this on devtool console | |
(function () { | |
const rows = document.querySelectorAll('[role="row"]') | |
const out = [] | |
rows.forEach((row) => { | |
const cells = row.querySelectorAll('[role="gridcell"]') | |
const outRow = [] | |
cells.forEach((cell) => { | |
outRow.push(cell.innerText.replace(/\n/g, ' ').trim()) | |
}) | |
out.push(outRow.join((','))) | |
}) | |
console.log(out.join('\n')) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment