import { writeFile } from "node:fs/promises"; import { join } from "node:path"; const fileReq = await fetch('https://cdn.nhcarrigan.com?prefix=koikatsu'); const files = await fileReq.text(); const keys = files.matchAll(/(.*?)<\/Key>/g); const keyNames = [...keys].map((key) => key[1]?.replace("koikatsu/", "")); const keyHtml = keyNames.map((key) => `
Digital art of Naomi.
`); const html = ` NHCarrigan

Naomi

For an interactive 3D reference, visit VRoid Hub.

${keyHtml.join('')}
`; await writeFile(join(import.meta.dirname, "site", "koikatsu.html"), html, "utf-8");