diff --git a/scripts/generateLayerOverview.ts b/scripts/generateLayerOverview.ts index c570555585..d59b292cab 100644 --- a/scripts/generateLayerOverview.ts +++ b/scripts/generateLayerOverview.ts @@ -51,17 +51,22 @@ for (const i in licenses) { } const knownPaths = new Set(licensePaths) +const linuxHints = [] + function validateLayer(layerJson: LayerConfigJson, context?: string): string[] { let errorCount = []; if (layerJson["overpassTags"] !== undefined) { - errorCount.push("CRIT! Layer ", layerJson.id, "still uses the old 'overpassTags'-format. Please use 'source: {osmTags: }' instead") + errorCount.push("Layer "+ layerJson.id+ "still uses the old 'overpassTags'-format. Please use \"source\": {\"osmTags\": }' instead of \"overpassTags\": (note: this isn't your fault, the custom theme generator still spits out the old format)") } try { const layer = new LayerConfig(layerJson, "test", true) const images = Array.from(layer.ExtractImages()) const remoteImages = images.filter(img => img.indexOf("http") == 0) for (const remoteImage of remoteImages) { - errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id) + errorCount.push("Found a remote image: " + remoteImage + " in layer " + layer.id + ", please download it.") + const path = remoteImage.substring(remoteImage.lastIndexOf("/") + ) + linuxHints.push("wget "+remoteImage) + linuxHints.push(`echo '{"path":"${path}", "license": "", "authors": [ "= 0) { writeFileSync("layer_report.txt", errors)