ending stuff

This commit is contained in:
MeowcaTheoRange 2022-12-06 02:36:24 -06:00 committed by GitHub
parent dd8e2cfb5d
commit 54c3173e23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,8 @@ json.forEach((v, i) => {
var chars = { var chars = {
"---": "---" "---": "---"
}; };
var funnyTable = [
];
v.appearing_characters.forEach((vv, vi) => { v.appearing_characters.forEach((vv, vi) => {
chars[vv[0]] = vv[1]; chars[vv[0]] = vv[1];
mdTemp += `- ${vv[1]}\n`; mdTemp += `- ${vv[1]}\n`;
@ -32,6 +34,17 @@ json.forEach((v, i) => {
break; break;
} }
}); });
if (json[i - 1]) {
funnyTable[0] += "| |";
funnyTable[1] += "| --- |";
funnyTable[2] += "| [Previous](https://meowcatheorange.github.io/Dizzy-AU/story/human-readable/" + json[i - 1].id + ") |";
}
if (json[i + 1]) {
funnyTable[0] += " |";
funnyTable[1] += " --- |";
funnyTable[2] += " [Next](https://meowcatheorange.github.io/Dizzy-AU/story/human-readable/" + json[i + 1].id + ") |";
}
mdTemp += funnyTable.join("\n");
fullMd += mdTemp + "\n\n"; fullMd += mdTemp + "\n\n";
fs.writeFileSync(`${path}/story/human-readable/${v.id}.md`, mdTemp, {encoding: "utf8"}); fs.writeFileSync(`${path}/story/human-readable/${v.id}.md`, mdTemp, {encoding: "utf8"});
indexmd += "### [" + v.id + "](https://meowcatheorange.github.io/Dizzy-AU/story/human-readable/" + v.id + ")\n\n" + chlist indexmd += "### [" + v.id + "](https://meowcatheorange.github.io/Dizzy-AU/story/human-readable/" + v.id + ")\n\n" + chlist