From 257e6dd2b5343782ac9b68153f564b76b972aa02 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 27 Jul 2023 13:04:27 +0200 Subject: [PATCH] Docs: more work on the licenses --- LICENSES/LOGO.txt | 1 + assets/layers/food/license_info.json | 2 +- assets/layers/veterinary/license_info.json | 2 +- assets/themes/cycle_highways/license_info.json | 2 +- assets/themes/pets/license_info.json | 2 +- scripts/generateLicenseInfo.ts | 16 +++++++++------- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/LICENSES/LOGO.txt b/LICENSES/LOGO.txt index cb76b7364..52adb9474 100644 --- a/LICENSES/LOGO.txt +++ b/LICENSES/LOGO.txt @@ -4,6 +4,7 @@ The attached file is the logo of an company, organization or brand. This logo is used under a FAIR-USE doctrine, e.g. - in the context of a map feature, to indicate that this feature is operated by this organization or that this feature is branded similarly in the same way. Keep in mind that the data might be wrong and that no relationship between the author of the software and this organization might exist +- in the context of a communication platform, a logo representing the platform might be used. For example, if the contributor adds a link to their Mastodon-profile, a Mastodon-logo might be shown next to it. - in the context of a thematic map, to indicate that this map has been developed for this organisation or with funds of this organization. The inclusion of this logo does by no means give others the right to reuse or modify this logo. diff --git a/assets/layers/food/license_info.json b/assets/layers/food/license_info.json index 8006dbff6..aae3af1da 100644 --- a/assets/layers/food/license_info.json +++ b/assets/layers/food/license_info.json @@ -1,7 +1,7 @@ [ { "path": "Vegetarian-mark.svg", - "license": "PD", + "license": "PUBLIC-DOMAIN", "authors": [ "European Vegetarian Union" ], diff --git a/assets/layers/veterinary/license_info.json b/assets/layers/veterinary/license_info.json index 0b9a7474d..9fa958690 100644 --- a/assets/layers/veterinary/license_info.json +++ b/assets/layers/veterinary/license_info.json @@ -1,7 +1,7 @@ [ { "path": "vet.svg", - "license": "PD", + "license": "PUBLIC-DOMAIN", "authors": [ "Niels Elgaard Larsen", "Tim Hitchins" diff --git a/assets/themes/cycle_highways/license_info.json b/assets/themes/cycle_highways/license_info.json index d34b04f2c..ef2a5e147 100644 --- a/assets/themes/cycle_highways/license_info.json +++ b/assets/themes/cycle_highways/license_info.json @@ -1,7 +1,7 @@ [ { "path": "fietssnelwegen-logo.svg", - "license": "LOGO-BY-THE-GOVERNMENT", + "license": "LOGO", "authors": [ "De Vlaamse Provincies" ], diff --git a/assets/themes/pets/license_info.json b/assets/themes/pets/license_info.json index be5931c92..7bfabe9b0 100644 --- a/assets/themes/pets/license_info.json +++ b/assets/themes/pets/license_info.json @@ -1,7 +1,7 @@ [ { "path": "dog-food.svg", - "license": "PD", + "license": "PUBLIC-DOMAIN", "authors": [ "Public Domain Symbols", "Jean Victor Balin ", diff --git a/scripts/generateLicenseInfo.ts b/scripts/generateLicenseInfo.ts index bdd976341..96c106b2c 100644 --- a/scripts/generateLicenseInfo.ts +++ b/scripts/generateLicenseInfo.ts @@ -208,19 +208,17 @@ export class GenerateLicenseInfo extends Script { "CREATIVE-COMMONS-4.0-BY-NC": "CC-BY-NC-4.0", "CC-BY-SA-3.0-UNPORTED": "CC-BY-SA-3.0", "ISC-LICENSE": "ISC", + "LOGO-BY-THE-GOVERNMENT": "LOGO", + PD: "PUBLIC-DOMAIN", /* ALL-RIGHTS-RESERVED: PD: PUBLIC-DOMAIN: - GNU: - GPL: - ISC-LICENSE: - LOGO-BY-THE-GOVERNMENT: - LOGO: TRIVIAL: //*/ } return mappings[licenseId] ?? licenseId } + cleanLicenseInfo(allPaths: string[], allLicenseInfos: SmallLicense[]) { // Read the license info file from the generated assets, creates a compiled license info in every directory // Note: this removes all the old license infos @@ -245,9 +243,13 @@ export class GenerateLicenseInfo extends Script { sources: license.sources, } - cloned.license = Utils.Dedup( + const licenses = Utils.Dedup( cloned.license.split(";").map((l) => this.toSPDXCompliantLicense(l)) - ).join("; ") + ) + if (licenses.length > 1 && licenses.indexOf("TRIVIAL") > 0) { + // licenses.splice(licenses.indexOf("TRIVIAL"), 1) + } + cloned.license = licenses.join("; ") perDirectory.get(dir).push(cloned) }