From 0fea2c87cd831f88581fa191a0c95381951c26dd Mon Sep 17 00:00:00 2001 From: pietervdvn Date: Wed, 7 Apr 2021 01:32:39 +0200 Subject: [PATCH] Add attribution script and some attributions --- AllTranslationAssets.ts | 3 + InitUiElements.ts | 7 +- README.md | 2 +- UI/BigComponents/Attribution.ts | 3 + UI/BigComponents/AttributionPanel.ts | 26 ++++ assets/translations.json | 8 + package-lock.json | 28 ++++ package.json | 7 +- .../{createLayouts.ts => generateLayouts.ts} | 0 scripts/generateLicenseInfo.ts | 147 ++++++++++++++++++ ...{createWikiPage.ts => generateWikiPage.ts} | 0 11 files changed, 223 insertions(+), 8 deletions(-) create mode 100644 UI/BigComponents/AttributionPanel.ts rename scripts/{createLayouts.ts => generateLayouts.ts} (100%) create mode 100644 scripts/generateLicenseInfo.ts rename scripts/{createWikiPage.ts => generateWikiPage.ts} (100%) diff --git a/AllTranslationAssets.ts b/AllTranslationAssets.ts index 6552d52..1149795 100644 --- a/AllTranslationAssets.ts +++ b/AllTranslationAssets.ts @@ -68,6 +68,9 @@ export default class AllTranslationAssets { openStreetMapIntro: new Translation( {"en":"

An Open Map

Wouldn't it be cool if there was a single map, which everyone could freely use and edit? A single place to store all geo-information? Then, all those websites with different, small and incompatible maps (which are always outdated) wouldn't be needed anymore.

OpenStreetMap is this map. The map data can be used for free (with attribution and publication of changes to that data). On top of that, everyone can freely add new data and fix errors. This website uses OpenStreetMap as well. All the data is from there, and your answers and corrections are added there as well.

A ton of people and application already use OpenStreetMap: Maps.me, OsmAnd, but also the maps at Facebook, Instagram, Apple-maps and Bing-maps are (partly) powered by OpenStreetMap.If you change something here, it'll be reflected in those applications too - after their next update!

","es":"

Un mapa abierto

¿No sería genial si hubiera un solo mapa, que todos pudieran usar y editar libremente?¿Un solo lugar para almacenar toda la información geográfica? Entonces, todos esos sitios web con mapas diferentes, pequeños e incompatibles (que siempre están desactualizados) ya no serían necesarios.

OpenStreetMap es ese mapa. Los datos del mapa se pueden utilizar de forma gratuita (con atribución y publicación de cambios en esos datos).Además de eso, todos pueden agregar libremente nuevos datos y corregir errores. Este sitio web también usa OpenStreetMap. Todos los datos provienen de allí, y tus respuestas y correcciones también se añadirán allí.

Muchas personas y aplicaciones ya usan OpenStreetMap: Maps.me, OsmAnd, pero también los mapas de Facebook, Instagram, Apple y Bing son (en parte) impulsados ​​por OpenStreetMap .Si cambias algo aquí, también se reflejará en esas aplicaciones, en su próxima actualización

","ca":"

Un mapa obert

No seria genial si hagués un únic mapa, que tothom pogués utilitzar i editar lliurement?Un sol lloc on emmagatzemar tota la informació geogràfica? Llavors tots aquests llocs web amb mapes diferents petits i incompatibles (que sempre estaran desactulitzats) ja no serien necessaris.

OpenStreetMap és aquest mapa. Les dades del mapa es poden utilitzar de franc (amb atribució i publicació de canvis en aquestes dades).A més a més, tothom pot agregar lliurement noves dades i corregir errors. De fet, aquest lloc web també fa servir OpenStreetMap. Totes les dades provenen d'allà i les teves respostes i correccions també s'afegiran allà.

Moltes persones i aplicacions ja utilitzen OpenStreetMap: Maps.me, OsmAnd, però també els mapes de Facebook, Instagram, Apple i Bing són (en part) impulsats ​​per OpenStreetMap.Si canvies alguna cosa aquí també es reflectirà en aquestes aplicacions en la seva propera actualització.

","nl":"

Een open kaart

Zou het niet fantastisch zijn als er een open kaart zou zijn die door iedereen aangepast én gebruikt kan worden? Een kaart waar iedereen zijn interesses aan zou kunnen toevoegen? Dan zouden er geen duizend-en-één verschillende kleine kaartjes, websites, ... meer nodig zijn

OpenStreetMap is deze open kaart. Je mag de kaartdata gratis gebruiken (mits bronvermelding en herpublicatie van aanpassingen). Daarenboven mag je de kaart ook gratis aanpassen als je een account maakt. Ook deze website is gebaseerd op OpenStreetMap. Als je hier een vraag beantwoord, gaat het antwoord daar ook naartoe

Tenslotte zijn er reeds vele gebruikers van OpenStreetMap. Denk maar Maps.me, OsmAnd, verschillende gespecialiseerde routeplanners, de achtergrondkaarten op Facebook, Instagram,...
Zelfs Apple Maps en Bing-Maps gebruiken OpenStreetMap in hun kaarten!

Kortom, als je hier een punt toevoegd of een vraag beantwoord, zal dat na een tijdje ook in al dié applicaties te zien zijn.

","fr":"

Une carte ouverte

Ne serait-il pas génial d'avoir sur une carte que tout le monde pourrait éditer ouvertement? Une seule et unique plateforme regroupant toutes les informations geographiques? Ainsi nous n'aurons plus besoin de toutes ces cartes petites et incompatibles cartes (souvent non mises à jour).

OpenStreetMap est la carte qu'il vous faut!. Toutes les données de cette carte peuvent être utilisé gratuitement (avec d'attribution et de publication des changements de données). De plus tout le monde est libre d'ajouter de nouvelles données et de corriger les erreurs. Ce site internet utilise également OpenStreetMap. Toutes les données en proviennent et tous les ajouts et modifications y seront également ajoutés.

De nombreux individus et d'applications utilisent déjà OpenStreetMap: Maps.me, OsmAnd, mais aussi les cartes de Facebook, Instagram, Apple-maps et Bing-maps sont (en partie) supporté par OpenStreetMap. Si vous modifié quelque chose ici, ces changements seront incorporer dans ces applications dès leurs mises à jour!

","gl":"

Un mapa aberto

Non sería xenial se houbera un só mapa, que todos puideran empregar e editar de xeito libre?Un só lugar para almacenar toda a información xeográfica? Entón, todos eses sitios web con mapas diferentes, pequenos e incompatíbeis (que sempre están desactualizados) xa non serían necesarios.

OpenStreetMap é ese mapa. Os datos do mapa pódense empregar de balde (con atribución e publicación de modificacións neses datos).Ademais diso, todos poden engadir de xeito ceibe novos datos e corrixir erros. Este sitio web tamén emprega o OpenStreetMap. Todos os datos proveñen de alí, e as túas respostas e correccións tamén serán engadidas alí.

Moitas persoas e aplicacións xa empregan o OpenStreetMap: Maps.me, OsmAnd, pero tamén os mapas do Facebook, Instagram, Apple e Bing son (en parte) impulsados ​​polo OpenStreetMap.Se mudas algo aquí, tamén será reflexado nesas aplicacións, na súa seguinte actualización!

","de":"

Eine offene Karte

Wäre es nicht toll, wenn es eine offene Karte gäbe, die von jedem angepasst und benutzt werden könnte? Eine Karte, zu der jeder seine Interessen hinzufügen kann? Dann bräuchte man all diese Websites mit unterschiedlichen, kleinen und inkompatiblen Karten (die immer veraltet sind) nicht mehr.

OpenStreetMap ist diese offene Karte. Die Kartendaten können kostenlos verwendet werden (mit Attribution und Veröffentlichung von Änderungen an diesen Daten). Darüber hinaus können Sie die Karte kostenlos ändern und Fehler beheben, wenn Sie ein Konto erstellen. Diese Website basiert ebenfalls auf OpenStreetMap. Wenn Sie eine Frage hier beantworten, geht die Antwort auch dorthin.

Viele Menschen und Anwendungen nutzen OpenStreetMap bereits: Maps.me, OsmAnd, verschiedene spezialisierte Routenplaner, die Hintergrundkarten auf Facebook, Instagram,...
Sogar Apple Maps und Bing Maps verwenden OpenStreetMap in ihren Karten!

Wenn Sie hier einen Punkt hinzufügen oder eine Frage beantworten, wird er nach einer Weile in all diesen Anwendungen sichtbar sein.

"} ), attribution: { attributionTitle: new Translation( {"en":"Attribution notice","nl":"Met dank aan"} ), attributionContent: new Translation( {"en":"

All data is provided by OpenStreetMap, freely reusable under the Open DataBase License.

Some images are provided by Wikimedia

"} ), + themeBy: new Translation( {"en":"Theme created by {author}"} ), + iconAttribution: { title: new Translation( {"en":"Used icons"} ), +}, }, sharescreen: { intro: new Translation( {"en":"

Share this map

Share this map by copying the link below and sending it to friends and family:","ca":"

Comparteix aquest mapa

Comparteix aquest mapa copiant l'enllaç de sota i enviant-lo a amics i família:","es":"

Comparte este mapa

Comparte este mapa copiando el enlace de debajo y enviándolo a amigos y familia:","fr":"

Partager cette carte

Partagez cette carte en copiant le lien suivant et envoyez-le à vos amis:","nl":"

Deel deze kaart

Kopieer onderstaande link om deze kaart naar vrienden en familie door te sturen:","gl":"

Comparte este mapa

Comparte este mapa copiando a ligazón de embaixo e enviándoa ás amizades e familia:","de":"

Diese Karte teilen

Sie können diese Karte teilen, indem Sie den untenstehenden Link kopieren und an Freunde und Familie schick"} ), addToHomeScreen: new Translation( {"en":"

Add to your home screen

You can easily add this website to your smartphone home screen for a native feel. Click the 'add to home screen button' in the URL bar to do this.","ca":"

Afegir-lo a la pantalla d'inici

Pots afegir aquesta web a la pantalla d'inici del teu smartphone per a que es vegi més nadiu. Apreta al botó 'afegir a l'inici' a la barra d'adreces URL per fer-ho.","es":"

Añadir a la pantalla de inicio

Puedes añadir esta web en la pantalla de inicio de tu smartphone para que se vea más nativo. Aprieta el botón 'añadir a inicio' en la barra de direcciones URL para hacerlo.","fr":"

Ajouter à votre page d'accueil

Vous pouvez facilement ajouter la carte à votre écran d'accueil de téléphone. Cliquer sur le boutton 'ajouter à l'ecran d'accueil' dans la barre d'adresse pour éffectuer cette tâche.","gl":"

Engadir á pantalla de inicio

Podes engadir esta web na pantalla de inicio do teu smartphone para que se vexa máis nativo. Preme o botón 'engadir ó inicio' na barra de enderezos URL para facelo.","nl":"

Voeg toe aan je thuis-scherm

Je kan deze website aan je thuisscherm van je smartphone toevoegen voor een native feel","de":"

Zum Startbildschirm hinzufügen

Sie können diese Website einfach zum Startbildschirm Ihres Smartphones hinzufügen, um ein natives Gefühl zu erhalten. Klicken Sie dazu in der URL-Leiste auf die Schaltfläche 'Zum Startbildschirm hinzufügen'."} ), diff --git a/InitUiElements.ts b/InitUiElements.ts index f5e948f..a1365e1 100644 --- a/InitUiElements.ts +++ b/InitUiElements.ts @@ -38,6 +38,7 @@ import Combine from "./UI/Base/Combine"; import SelectedFeatureHandler from "./Logic/Actors/SelectedFeatureHandler"; import LZString from "lz-string"; import {LayoutConfigJson} from "./Customizations/JSON/LayoutConfigJson"; +import AttributionPanel from "./UI/BigComponents/AttributionPanel"; export class InitUiElements { @@ -287,11 +288,7 @@ export class InitUiElements { const copyrightNotice = new ScrollableFullScreen( () => Translations.t.general.attribution.attributionTitle.Clone(), - () => new Combine([ - Translations.t.general.attribution.attributionContent, - "
", - new Attribution(undefined, undefined, State.state.layoutToUse, undefined) - ]), + () => new AttributionPanel(State.state.layoutToUse), "copyright" ) diff --git a/README.md b/README.md index 223d61c..42b1103 100644 --- a/README.md +++ b/README.md @@ -244,4 +244,4 @@ Urinal icon: https://thenounproject.com/term/urinal/1307984/ Translation-icon: https://commons.wikimedia.org/wiki/File:OOjs_UI_icon_language-ltr.svg -PingPong-table icon: Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com \ No newline at end of file +PingPong-table icon: Font Awesome Free 5.2.0 by @fontawesome - https://fontawesome.com diff --git a/UI/BigComponents/Attribution.ts b/UI/BigComponents/Attribution.ts index 46934b4..dac7a0e 100644 --- a/UI/BigComponents/Attribution.ts +++ b/UI/BigComponents/Attribution.ts @@ -10,6 +10,9 @@ import Loc from "../../Models/Loc"; import LeafletMap from "../../Models/LeafletMap"; import * as L from "leaflet" +/** + * The bottom right attribution panel in the leaflet map + */ export default class Attribution extends UIElement { private readonly _location: UIEventSource; diff --git a/UI/BigComponents/AttributionPanel.ts b/UI/BigComponents/AttributionPanel.ts new file mode 100644 index 0000000..c8793b5 --- /dev/null +++ b/UI/BigComponents/AttributionPanel.ts @@ -0,0 +1,26 @@ +import {UIElement} from "../UIElement"; +import Combine from "../Base/Combine"; +import Translations from "../i18n/Translations"; +import Attribution from "./Attribution"; +import State from "../../State"; +import {UIEventSource} from "../../Logic/UIEventSource"; +import LayoutConfig from "../../Customizations/JSON/LayoutConfig"; +import {FixedUiElement} from "../Base/FixedUiElement"; + +/** + * The attribution panel shown on mobile + */ +export default class AttributionPanel extends Combine { + + constructor(layoutToUse: UIEventSource) { + super([ + Translations.t.general.attribution.attributionContent, + Translations.t.general.attribution.themeBy.Subs({author: layoutToUse.data.maintainer}), + "
", + new Attribution(undefined, undefined, State.state.layoutToUse, undefined), + "
", + "

", Translations.t.general.attribution.iconAttribution.title, "

" + + ]); + } +} \ No newline at end of file diff --git a/assets/translations.json b/assets/translations.json index bd79b4f..d985d59 100644 --- a/assets/translations.json +++ b/assets/translations.json @@ -520,6 +520,14 @@ }, "attributionContent": { "en": "

All data is provided by OpenStreetMap, freely reusable under the Open DataBase License.

Some images are provided by Wikimedia

" + }, + "themeBy": { + "en": "Theme created by {author}" + }, + "iconAttribution": { + "title": { + "en": "Used icons" + } } }, diff --git a/package-lock.json b/package-lock.json index 988d865..95c2c2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4029,6 +4029,11 @@ "integrity": "sha512-29GS75BE8asnTno3yB6ubOJOO0FboExEqNJy4bpz0GSmW/8wPTNL4h9h63c6s1uTrOopCmJYe/4yJLh5r92ZUA==", "dev": true }, + "@types/prompt-sync": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@types/prompt-sync/-/prompt-sync-4.1.0.tgz", + "integrity": "sha1-utMynv9bQRXjTvRpgjckTUEdRHA=" + }, "@types/q": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", @@ -9903,6 +9908,29 @@ "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, + "prompt-sync": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/prompt-sync/-/prompt-sync-4.2.0.tgz", + "integrity": "sha512-BuEzzc5zptP5LsgV5MZETjDaKSWfchl5U9Luiu8SKp7iZWD5tZalOxvNcZRwv+d2phNFr8xlbxmFNcRKfJOzJw==", + "requires": { + "strip-ansi": "^5.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "protocol-buffers-schema": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.5.1.tgz", diff --git a/package.json b/package.json index 2ab8e4d..691c168 100644 --- a/package.json +++ b/package.json @@ -13,11 +13,12 @@ "generate:editor-layer-index": "cd assets/ && wget https://osmlab.github.io/editor-layer-index/imagery.geojson --output-document=editor-layer-index.json", "generate:images": "ts-node scripts/generateIncludedImages.ts", "generate:translations": "ts-node scripts/generateTranslations.ts", - "generate:layouts": "ts-node scripts/createLayouts.ts", + "generate:layouts": "ts-node scripts/generateLayouts.ts", + "generate:docs": "ts-node scripts/generateDocs.ts", "optimize-images": "cd assets/generated/ && find -name '*.png' -exec optipng '{}' \\; && echo 'PNGs are optimized'", "generate": "npm run generate:images && npm run generate:translations", "build": "rm -rf dist/ && npm run generate && parcel build --public-url ./ *.html assets/** assets/**/** assets/**/**/** vendor/* vendor/*/*", - "prepare-deploy": "npm run test && npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache", + "prepare-deploy": "npm run test && npm run generate:editor-layer-index && npm run generate:layouts && npm run generate && npm run build && rm -rf .cache && npm run generate:docs", "deploy:staging": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/Staging/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/Staging/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "deploy:pietervdvn": "npm run prepare-deploy && rm -rf /home/pietervdvn/git/pietervdvn.github.io/MapComplete/* && cp -r dist/* /home/pietervdvn/git/pietervdvn.github.io/MapComplete/ && cd /home/pietervdvn/git/pietervdvn.github.io/ && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", "deploy:production": "rm -rf ./assets/generated && npm run prepare-deploy && npm run optimize-images && rm -rf /home/pietervdvn/git/mapcomplete.github.io/* && cp -r dist/* /home/pietervdvn/git/mapcomplete.github.io/ && cd /home/pietervdvn/git/mapcomplete.github.io/ && echo \"mapcomplete.osm.be\" > CNAME && git add * && git commit -m 'New MapComplete Version' && git push && cd - && npm run clean", @@ -38,6 +39,7 @@ "@types/leaflet-providers": "^1.2.0", "@types/leaflet.markercluster": "^1.4.3", "@types/lz-string": "^1.3.34", + "@types/prompt-sync": "^4.1.0", "autoprefixer": "^9.8.6", "country-language": "^0.1.7", "email-validator": "^2.0.4", @@ -58,6 +60,7 @@ "osmtogeojson": "^3.0.0-beta.4", "parcel": "^1.2.4", "postcss": "^7.0.35", + "prompt-sync": "^4.2.0", "sharp": "^0.27.0", "slick-carousel": "^1.8.1", "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.2", diff --git a/scripts/createLayouts.ts b/scripts/generateLayouts.ts similarity index 100% rename from scripts/createLayouts.ts rename to scripts/generateLayouts.ts diff --git a/scripts/generateLicenseInfo.ts b/scripts/generateLicenseInfo.ts new file mode 100644 index 0000000..3e7e1fa --- /dev/null +++ b/scripts/generateLicenseInfo.ts @@ -0,0 +1,147 @@ +import {Utils} from "../Utils"; + +Utils.runningFromConsole = true; + +import {existsSync, mkdirSync, readdirSync, readFileSync, writeFile, writeFileSync, lstatSync} from "fs"; +import {LicenseInfo} from "../Logic/Web/Wikimedia"; +import {icon, Icon} from "leaflet"; + +interface SmallLicense { + path: string, + authors: string[], + license: string, + sources: string[] +} + +/** + * Sweeps the entire 'assets/' (except assets/generated) directory for image files and any 'license_info.json'-file. + * Checks that the license info is included for each of them and generates a compiles license_info.json for those + */ + +function readDirRecSync(path): string[] { + const result = [] + for (const entry of readdirSync(path)) { + const fullEntry = path + "/" + entry + const stats = lstatSync(fullEntry) + if (stats.isDirectory()) { + // Subdirectory + // @ts-ignore + result.push(...readDirRecSync(fullEntry)) + } else { + result.push(fullEntry) + } + } + return result; +} + +function generateLicenseInfos(paths: string[]): SmallLicense[] { + const licenses = [] + for (const path of paths) { + console.log("Reading info from " + path) + const parsed = JSON.parse(readFileSync(path, "UTF-8")) + if (Array.isArray(parsed)) { + const l: SmallLicense[] = parsed + for (const smallLicens of l) { + smallLicens.path = path.substring(0, path.length - "license_info.json".length) + smallLicens.path + } + licenses.push(...l) + } else { + const smallLicens: SmallLicense = parsed; + smallLicens.path = path.substring(0, 1 + path.lastIndexOf("/")) + smallLicens.path + licenses.push(smallLicens) + } + + } + return licenses +} + +function missingLicenseInfos(licenseInfos: SmallLicense[], allIcons: string[]) { + const missing = [] + + const knownPaths = new Set() + for (const licenseInfo of licenseInfos) { + knownPaths.add(licenseInfo.path) + } + + for (const iconPath of allIcons) { + if (iconPath.indexOf("license_info.json") >= 0) { + continue; + } + if (knownPaths.has(iconPath)) { + continue; + } + missing.push(iconPath) + } + return missing; +} + +const prompt = require('prompt-sync')(); + +function promptLicenseFor(path): SmallLicense { + const author = prompt("What is the author for artwork " + path + "? (me == Pieter Vander Vennet/CC0, Q to quit) > ") + path = path.substring(path.lastIndexOf("/") + 1) + if (author == "me") { + return { + authors: ["Pieter Vander Vennet"], + path: path, + license: "CC0", + sources: [] + } + } + if (author == "cf") { + return { + authors: ["Pieter Fiers", "Thibault Declercq", "Pierre Barban", "Joost Schouppe","Pieter Vander Vennet"], + path: path, + license: "CC-BY-SA", + sources: ["https://osoc.be/editions/2020/cyclofix"] + } + } + if (author == "gitte") { + return { + authors: ["Gitte Vande Graveele"], + path: path, + license: "CC-BY-SA", + sources: ["https://osoc.be/editions/2020/walk-by-brussels"] + } + } + + if(author == "s"){ + return null; + } + if (author == "Q" || author == "q" || author == "") { + throw "Quitting now!" + } + return { + authors: author.split(";"), + path: path, + license: prompt("What is the license for artwork " + path + "? > "), + sources: prompt("Where was this artwork found? > ").split(";") + } +} + +function createLicenseInfoFor(path): void { + const li = promptLicenseFor(path); + if(li == null){ + return; + } + writeFileSync(path + ".license_info.json", JSON.stringify(li, null, " ")) +} + +console.log("Checking and compiling license info") +const contents = readDirRecSync("./assets") + .filter(entry => entry.indexOf("./assets/generated") != 0) +const licensePaths = contents.filter(entry => entry.indexOf("license_info.json") >= 0) +const licenseInfos = generateLicenseInfos(licensePaths); +writeFileSync("./assets/generated/license_info.json", JSON.stringify(licenseInfos, null, " ")) + +const artwork = contents.filter(pth => pth.match(/(.svg|.png|.jpg)$/i) != null) +const missingLicenses = missingLicenseInfos(licenseInfos, artwork) + +console.log(`There are ${missingLicenses.length} licenses missing.`) + +let i = 1; +for (const missingLicens of missingLicenses) { + console.log(i + " / " + missingLicenses.length) + createLicenseInfoFor(missingLicens) + i++; +} \ No newline at end of file diff --git a/scripts/createWikiPage.ts b/scripts/generateWikiPage.ts similarity index 100% rename from scripts/createWikiPage.ts rename to scripts/generateWikiPage.ts