This project is a simple single-page application template that allows users to rank songs from a list by comparing them in duels.
party-ranking-sorter-template/
├── index.html
├── style.css
├── script.js
├── songList.json
├── config.js
└── README.md
- Autosave to the local storage after each duel.
- Can load saved result or show final result if sorter was previously completed.
- Options for choosing between mp3 and video files when sorting.
- Region selection for catbox links (EU, NA1, NA2).
To set up a custom sorter for your specific party ranking, follow these steps:
-
Update
songList.json:- Replace the content of
songList.jsonwith your own list of songs. Each song should have anid,anime,name,video, and optionally anmp3field. - Links should be either animemusicquiz catbox links or YouTube links.
- Converting hyperlinks to URLs:
function GETURL(input) { const sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); const myFormula = SpreadsheetApp.getActiveRange().getFormula(); const matches = (myFormula.indexOf("(") !== -1 && myFormula.indexOf(")") !== -1) ? myFormula.slice(myFormula.indexOf("(") + 1, myFormula.indexOf(")")) : undefined; const range = sheet.getRange(matches); const linkUrls = range.getRichTextValues().map(ia => ia.map(row => row.getLinkUrl())); return linkUrls; }
- Regex because I'm lazy:
(\d+)\t(.+)?\t(.+)\t\t(.+)\n?to{"id": $1, "anime": "$2", "name": "$3", "video": "$4", "mp3": null },\n - Example:
[ { "id": 1, "anime": "Your Anime Title", "name": "Your Song Name", "video": "https://your-video-url.com", "mp3": "https://your-mp3-url.com" }, { "id": 2, "anime": "Another Anime Title", "name": "Another Song Name", "video": "https://another-video-url.com", "mp3": "https://another-mp3-url.com" }, { "id": 3, "anime": "Example Anime", "name": "Example Song", "video": "https://eudist.animemusicquiz.com/example.webm", "mp3": "https://eudist.animemusicquiz.com/example.mp3" } ]
- Replace the content of
-
Update the Title and Description in
config.js:- Open
config.jsand change thetitleanddescriptionvariables to match your custom sorter. - Also you will have to change
localStoragePrefixif you plan on hosting multiple github-pages from a single account (there is an issue of sharedlocalStorageif base URL is the same, so need to differentiatelocalStoragefor different party rankings) - Example:
const config = { localStoragePrefix: "your-party-rank-sorter", title: "Your Custom Party Rank Sorter", description: "Party rank sorter for your custom list of songs." };
- Open
Most of the project was taken from this repo by FlatoLitou: Winter2025ED.