2021-03-13 19:07:11 +01:00
|
|
|
import {Utils} from "../Utils";
|
|
|
|
Utils.runningFromConsole = true;
|
|
|
|
import SpecialVisualizations from "../UI/SpecialVisualizations";
|
|
|
|
import {existsSync, mkdirSync, readFileSync, writeFile, writeFileSync} from "fs";
|
2021-03-22 01:06:24 +01:00
|
|
|
import {UIElement} from "../UI/UIElement";
|
|
|
|
import MetaTagging from "../Logic/MetaTagging";
|
2021-03-13 19:07:11 +01:00
|
|
|
|
|
|
|
|
2021-03-22 01:06:24 +01:00
|
|
|
const TurndownService = require('turndown')
|
|
|
|
|
|
|
|
function WriteFile(filename, html: UIElement) : void {
|
|
|
|
const md = new TurndownService().turndown(html.InnerRender());
|
|
|
|
writeFileSync(filename, md);
|
|
|
|
}
|
|
|
|
|
|
|
|
WriteFile("./Docs/SpecialRenderings.md", SpecialVisualizations.HelpMessage)
|
2021-03-22 02:45:22 +01:00
|
|
|
WriteFile("./Docs/CalculatedTags.md", MetaTagging.HelpText())
|
2021-03-22 01:06:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
console.log("Generated docs")
|
|
|
|
|