Created
April 1, 2023 06:28
-
-
Save vgmoose/3f2c980537469900de548c7c43641fd1 to your computer and use it in GitHub Desktop.
node uwu_repo.js
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
import Uwuifier from 'uwuifier'; | |
import fs from 'fs'; | |
const uwuifier = new Uwuifier(); | |
for (var platform of ["switch", "wiiu"]) { | |
let pkgData = await fetch(`https://${platform}.cdn.fortheusers.org/repo.json`); | |
var packages = await pkgData.json(); | |
for (var pkg of packages["packages"]) { | |
pkg["details"] = uwuifier.uwuifySentence(pkg["details"]); | |
pkg["changelog"] = uwuifier.uwuifySentence(pkg["changelog"]); | |
} | |
fs.writeFile(`${platform}_repo.json`, JSON.stringify(packages), err => { | |
if (err) { | |
console.error(err); | |
} | |
// file written successfully | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment