Update converter.js

This commit is contained in:
MeowcaTheoRange 2022-05-28 14:02:19 -05:00 committed by GitHub
parent 7735f057ef
commit e3cded50c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,6 +3,7 @@ var path = process.argv[2]
console.log(path);
var json = JSON.parse(fs.readFileSync(path + "/story/database.json", { encoding: "utf8" }));
var fullMd = "";
json.forEach((v, i) => {
var mdTemp = `# ${v.scene}\n`;
@ -26,5 +27,7 @@ json.forEach((v, i) => {
break;
}
});
fullMd += mdTemp + "\n\n";
fs.writeFileSync(`${path}/story/human-readable/${v.id}.md`, mdTemp, {encoding: "utf8"});
})
fs.writeFileSync(`${path}/story/human-readable.md`, fullMd, {encoding: "utf8"});