From c7e7b4beedbfcc698ef5a530db151d3fc63f3c80 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Mon, 28 Jul 2025 15:18:12 +0200 Subject: [PATCH] Scripts: update id-preset reading script --- scripts/thieves/readIdPresets.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/scripts/thieves/readIdPresets.ts b/scripts/thieves/readIdPresets.ts index 1a995453f..123a45706 100644 --- a/scripts/thieves/readIdPresets.ts +++ b/scripts/thieves/readIdPresets.ts @@ -1,5 +1,5 @@ /*** - * Parses presets from the iD repository and extracts some usefull tags from them + * Parses presets from the iD repository and extracts some useful tags from them */ import ScriptUtils from "../ScriptUtils" import { existsSync, readFileSync, writeFileSync } from "fs" @@ -8,6 +8,8 @@ import { LayerConfigJson } from "../../src/Models/ThemeConfig/Json/LayerConfigJs import { MappingConfigJson } from "../../src/Models/ThemeConfig/Json/QuestionableTagRenderingConfigJson" import SmallLicense from "../../src/Models/smallLicense" import Script from "../Script" +import { GenerateLicenseInfo } from "../generateLicenseInfo" + interface IconThief { steal(iconName: string): boolean @@ -285,8 +287,20 @@ class IdThief { class ReadIdPresets extends Script { constructor() { super( - "Reads the id-tagging-schema repository and steals the presets; which will be written into 'id_presets.json'\n\nArguments: [path-to-repository] [path-to-target]\n" + - "Note that default arguments are used" + [ + + "Reads the id-tagging-schema repository and steals the presets; which will be written into 'id_presets.json'\n\nArguments: [path-to-repository] [path-to-target]", + "Note that default arguments are used", + "Before running this script, you'll want to have the following file structure:", + "", + "# ../mapcomplete (this repository)", + "cd ../font-awesome && git pull && cd - # (https://github.com/FortAwesome/Font-Awesome)", + "cd ../temaki && git pull && cd - # https://github.com/ideditor/temaki", + "cd ../maki && git pull && cd - # https://github.com/mapbox/maki", + "cd ../id-tagging-schema && git pull && nvm use && npm ci && npm run build && npm run dist", + "", + "The source file is then loaded in ../id-tagging_schema/data/presets/shop/.Json" + ].join("\n") ) } @@ -349,3 +363,4 @@ class ReadIdPresets extends Script { } new ReadIdPresets().run() +