Skip to content

Instantly share code, notes, and snippets.

@vgmoose
Created April 1, 2023 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vgmoose/3f2c980537469900de548c7c43641fd1 to your computer and use it in GitHub Desktop.
Save vgmoose/3f2c980537469900de548c7c43641fd1 to your computer and use it in GitHub Desktop.
node uwu_repo.js
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