From 54c3173e2315ad9bcecaf4a87806b6b01a2c9e94 Mon Sep 17 00:00:00 2001 From: MeowcaTheoRange <58280776+MeowcaTheoRange@users.noreply.github.com> Date: Tue, 6 Dec 2022 02:36:24 -0600 Subject: [PATCH] ending stuff --- code/converter.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/code/converter.js b/code/converter.js index a944c3b..4f77a70 100644 --- a/code/converter.js +++ b/code/converter.js @@ -14,6 +14,8 @@ json.forEach((v, i) => { var chars = { "---": "---" }; + var funnyTable = [ + ]; v.appearing_characters.forEach((vv, vi) => { chars[vv[0]] = vv[1]; mdTemp += `- ${vv[1]}\n`; @@ -32,6 +34,17 @@ json.forEach((v, i) => { 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"; 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