mirror of
https://github.com/CIMEngine/MapList.git
synced 2024-11-05 20:23:58 +03:00
fix: readme generator
This commit is contained in:
parent
762eaeb09f
commit
7cfe3f9b0b
2 changed files with 5 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
|||
# CIM Engine map list
|
||||
|
||||
## Political Map of the World ([worldMap](https://cimengine.github.io/map/?id=worldMap))
|
||||
|
||||
## ERTH2 - Map of the Virtual States of the ERTH2 Universe ([movc](https://cimengine.github.io/map/?id=movc))
|
||||
|
||||
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))
|
||||
|
|
5
index.js
5
index.js
|
@ -4,11 +4,12 @@ const index = JSON.parse(fs.readFileSync("./index.json", "utf-8"));
|
|||
|
||||
let readme = "# CIM Engine map list\n\n";
|
||||
|
||||
let k = 1;
|
||||
for (let id in index) {
|
||||
let item = index[id];
|
||||
readme += `## ${item.name} ${
|
||||
readme += `${k++}. ${item.name} ${
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue