diff --git a/Logic/MetaTagging.ts b/Logic/MetaTagging.ts index fc262e602..c0e4e2274 100644 --- a/Logic/MetaTagging.ts +++ b/Logic/MetaTagging.ts @@ -3,9 +3,9 @@ import State from "../State"; import opening_hours from "opening_hours"; import {And, Or, Tag} from "./Tags"; import {Utils} from "../Utils"; -import CountryCoder from "latlon2country" import {UIElement} from "../UI/UIElement"; import Combine from "../UI/Base/Combine"; +import CountryCoder from "latlon2country" class SimpleMetaTagger { public readonly keys: string[]; diff --git a/scripts/generateDocs.ts b/scripts/generateDocs.ts index 01d2e0823..ac8dd5e00 100644 --- a/scripts/generateDocs.ts +++ b/scripts/generateDocs.ts @@ -2,10 +2,20 @@ import {Utils} from "../Utils"; Utils.runningFromConsole = true; import SpecialVisualizations from "../UI/SpecialVisualizations"; import {existsSync, mkdirSync, readFileSync, writeFile, writeFileSync} from "fs"; +import {UIElement} from "../UI/UIElement"; +import MetaTagging from "../Logic/MetaTagging"; -const html = SpecialVisualizations.HelpMessage.InnerRender(); -var TurndownService = require('turndown') -const md = new TurndownService().turndown(html); -writeFileSync("./Docs/SpecialRenderings.md", md) -console.log("Generated docs") \ No newline at end of file +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) +// WriteFile("./Docs/CalculatedTags.md", MetaTagging.HelpText()) + + +console.log("Generated docs") +