Created
December 31, 2024 00:57
-
-
Save tmacam/754cbcf90633b7792ba24b5d77b99022 to your computer and use it in GitHub Desktop.
Bookmarklet to download 604 results as CSV
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
javascript:(function() { | |
const categories = Object.fromEntries(Array.from(document.querySelectorAll("#idSkillCategoryId > option")).map(option => [option.value, option.text])); | |
const separator = "\t"; /* Yeah, tab separated CSV. Deal with it.*/ | |
const tsvHeader = ["skillname", "category", "lastresult", "pr", "tries", "daysince"].join(separator); | |
const tsvData = personResults.resultSet.map(res => [res.skillname, categories[res.categoryid],res.lastresult, res.pr, res.tries, res.daysince].join(separator)); | |
const tsvContent = [tsvHeader].concat(tsvData).join("\n"); | |
const blob = new Blob([tsvContent], { type: 'text/csv' }); | |
/* Initiate download of CSV data */ | |
const url = URL.createObjectURL(blob); | |
const a = document.createElement('a'); | |
a.href = url; | |
a.download = '604PersonalResult.csv'; | |
document.body.appendChild(a); | |
a.click(); | |
document.body.removeChild(a); | |
URL.revokeObjectURL(url); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Host to export things from Zendesk:
Workouts
>Progress & results
). Beware: That pages takes an eternity to load. Yeah...