fix: readme generator

This commit is contained in:
Artemy 2023-06-11 09:33:15 +03:00
parent 762eaeb09f
commit 7cfe3f9b0b
2 changed files with 5 additions and 6 deletions

View file

@ -1,6 +1,4 @@
# CIM Engine map list # CIM Engine map list
## Political Map of the World ([worldMap](https://cimengine.github.io/map/?id=worldMap)) 1. Political Map of the World ([worldMap](https://cimengine.github.io/map/?id=worldMap))
2. ERTH2 - Map of the Virtual States of the ERTH2 Universe ([movc](https://cimengine.github.io/map/?id=movc))
## ERTH2 - Map of the Virtual States of the ERTH2 Universe ([movc](https://cimengine.github.io/map/?id=movc))

View file

@ -4,11 +4,12 @@ const index = JSON.parse(fs.readFileSync("./index.json", "utf-8"));
let readme = "# CIM Engine map list\n\n"; let readme = "# CIM Engine map list\n\n";
let k = 1;
for (let id in index) { for (let id in index) {
let item = index[id]; let item = index[id];
readme += `## ${item.name} ${ readme += `${k++}. ${item.name} ${
item.description ? `- ${item.description}` : "" item.description ? `- ${item.description}` : ""
} ([${id}](https://cimengine.github.io/map/?id=${id}))\n\n`; } ([${id}](https://cimengine.github.io/map/?id=${id}))\n`;
} }
fs.writeFileSync("./README.md", readme); fs.writeFileSync("./README.md", readme);