From fa053a3398a755b3c3f5e8ed7d87d98e7d9c4581 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Mon, 28 Aug 2023 22:39:49 +0200 Subject: [PATCH] =?UTF-8?q?more=20in=20N=C3=96=20and=20BG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/favicons/gmaps.svg | 7 ++++ commands/stats.ts | 4 +- data/Burgenland.json | 32 ++++++++++++++ data/Niederösterreich.json | 86 ++++++++++++++++++++++++++++++++++++++ data/Steiermark.json | 30 +++++++++++++ package-lock.json | 60 +++++++++++++------------- src/favicon.ts | 6 ++- src/text.ts | 2 +- 8 files changed, 194 insertions(+), 33 deletions(-) create mode 100644 assets/favicons/gmaps.svg diff --git a/assets/favicons/gmaps.svg b/assets/favicons/gmaps.svg new file mode 100644 index 0000000..a6f34ad --- /dev/null +++ b/assets/favicons/gmaps.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/commands/stats.ts b/commands/stats.ts index c5124a1..e5eb8db 100644 --- a/commands/stats.ts +++ b/commands/stats.ts @@ -25,9 +25,10 @@ function runstats() { } } console.log(dateCounts) - + let totalNumber = 0 files.forEach(f => { const data: Crossing[] = JSON.parse(fs.readFileSync(`../data/${f}.json`, 'utf8')); + totalNumber += data.length data.forEach(cr => { const dates = cr.sources.filter(s => s.type != "proposal").map(s => s.date).sort() const date = new Date(dates[0]) @@ -39,6 +40,7 @@ function runstats() { }) }) + console.log("total", totalNumber) const dateCountList = [] for (let dateCountsKey in dateCounts) { dateCountList.push({ diff --git a/data/Burgenland.json b/data/Burgenland.json index 5e980a7..41abebe 100644 --- a/data/Burgenland.json +++ b/data/Burgenland.json @@ -75,5 +75,37 @@ ], "length": 9.69 } + }, + { + "id": 2941975459, + "type": "prideFlag", + "name": "Parndorf Einkaufszentrum", + "sources": [ + { + "type": "photo", + "date": "2023-08-28" + } + ], + "geosource": { + "type": "OSMnodes", + "nodes": [ + 5981491046, + 268966416, + 1511570357 + ] + }, + "geo": { + "coords": [ + [ + 16.8474312, + 47.9778454 + ], + [ + 16.8476292, + 47.9778644 + ] + ], + "length": 14.89 + } } ] diff --git a/data/Niederösterreich.json b/data/Niederösterreich.json index 093b1fd..460abf5 100644 --- a/data/Niederösterreich.json +++ b/data/Niederösterreich.json @@ -197,5 +197,91 @@ ], "length": 8.46 } + }, + { + "id": 757992739, + "name": "Wiener Neudorf", + "type": "prideFlag", + "sources": [ + { + "type": "news", + "url": "https://www.noen.at/video/noen-n1-tv-regenbogen-zebrastreifen-in-wiener-neudorf-381577504", + "date": "2023-08-18" + }, + { + "type": "news", + "url": "https://www.meinbezirk.at/moedling/c-lokales/regenbogen-zebrastreifen-in-wiener-neudorf_a6223674", + "date": "2023-08-25" + } + ], + "geosource": { + "type": "RawCoords", + "coords": [ + [ + 16.31779, + 48.08644 + ], + [ + 16.31776, + 48.08635 + ] + ] + }, + "geo": { + "coords": [ + [ + 16.31779, + 48.08644 + ], + [ + 16.31776, + 48.08635 + ] + ], + "length": 10.25 + } + }, + { + "id": 1016612021, + "name": "Traismauer", + "type": "prideFlag", + "sources": [ + { + "type": "official", + "url": "https://www.facebook.com/mapeiaustriagmbh/posts/pfbid02igTyicMNYEhzA2PVHMzrf7yqhJSfHVszBVvzh3RdFKoVJxybjbucA6Gxs5g9mXQvl", + "date": "2022-08-12" + }, + { + "type": "streetview", + "url": "https://www.google.com/maps/@48.3508004,15.7431973,3a,77y,352.02h,87.2t/data=!3m6!1e1!3m4!1ss29JNQ2lyLm5aO4hjORMFw!2e0!7i16384!8i8192?entry=ttu", + "date": "2023-03-01" + } + ], + "geosource": { + "type": "RawCoords", + "coords": [ + [ + 15.74309, + 48.35099 + ], + [ + 15.74323, + 48.35101 + ] + ] + }, + "geo": { + "coords": [ + [ + 15.74309, + 48.35099 + ], + [ + 15.74323, + 48.35101 + ] + ], + "length": 10.58 + } } ] diff --git a/data/Steiermark.json b/data/Steiermark.json index 08ca4d9..56e04d6 100644 --- a/data/Steiermark.json +++ b/data/Steiermark.json @@ -82,5 +82,35 @@ ], "length": 10.11 } + }, + { + "id": 1260971435, + "name": "Gleisdorf", + "type": "prideFlag", + "sources": [ + { + "type": "news", + "url": "https://www.kleinezeitung.at/steiermark/weiz/6311317/FPOe-ist-empoert_1200-Euro-fuer-RegenbogenZebrastreifen-in-Gleisdorf", + "date": "2023-08-01" + } + ], + "comment": "Exakte Position unbekannt", + "geosource": { + "type": "OSMway", + "wayID": 306268826 + }, + "geo": { + "coords": [ + [ + 15.7140729, + 47.105878 + ], + [ + 15.7141261, + 47.1058395 + ] + ], + "length": 5.88 + } } ] diff --git a/package-lock.json b/package-lock.json index 7c32e6d..07529bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -484,9 +484,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.5.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.0.tgz", - "integrity": "sha512-Mgq7eCtoTjT89FqNoTzzXg2XvCi5VMhRV6+I2aYanc6kQCBImeNaAYRs/DyoVqk1YEUJK5gN9VO7HRIdz4Wo3Q==" + "version": "20.5.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.5.7.tgz", + "integrity": "sha512-dP7f3LdZIysZnmvP3ANJYTSwg+wLLl8p7RqniVlV7j+oXSXAbt9h0WIBFmJy5inWZoX9wZN6eXx+YXd9Rh3RBA==" }, "node_modules/acorn": { "version": "8.10.0", @@ -579,9 +579,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.4.0.tgz", - "integrity": "sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.5.0.tgz", + "integrity": "sha512-D4DdjDo5CY50Qms0qGQTTw6Q44jl7zRwY7bthds06pUGfChBCTcQs+N743eFWGEd6pRTMd6A+I87aWyFV5wiZQ==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -866,9 +866,9 @@ "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "dev": true, "hasInstallScript": true, "optional": true, @@ -952,9 +952,9 @@ ] }, "node_modules/immutable": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.2.tgz", - "integrity": "sha512-oGXzbEDem9OOpDWZu88jGiYCvIsLHMvGw+8OXlpsvTFvIQplQbjg1B1cvKg8f7Hoch6+NGjpPsH1Fr+Mc2D1aA==", + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.3.4.tgz", + "integrity": "sha512-fsXeu4J4i6WNWSikpI88v/PcVflZz+6kMhUfIwc5SY+poQRPnaf5V7qds6SUyUN3cVxEzuCab7QIoLOQ+DQ1wA==", "dev": true }, "node_modules/inflight": { @@ -1188,9 +1188,9 @@ } }, "node_modules/ol": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/ol/-/ol-7.5.0.tgz", - "integrity": "sha512-ENjuod3oIdAR3shCPKPmzoObb2wRfNtMSwhvYEA7kJ9RbZABzqPCsfJegSnZumJfd2Crk6Nw2u1p3IdX6g9RbQ==", + "version": "7.5.1", + "resolved": "https://registry.npmjs.org/ol/-/ol-7.5.1.tgz", + "integrity": "sha512-CFXDhO8YdQt7I+zwrGYSONo/ZM2oLr7vUvxqpLEUyy+USaQjUeE8L6FBOWIPboopGVhnSVYd5hdEirn9ifKBZQ==", "dependencies": { "earcut": "^2.2.3", "geotiff": "^2.0.7", @@ -1270,9 +1270,9 @@ } }, "node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "version": "8.4.28", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.28.tgz", + "integrity": "sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw==", "dev": true, "funding": [ { @@ -1316,9 +1316,9 @@ } }, "node_modules/quick-lru": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.1.tgz", - "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-6.1.2.tgz", + "integrity": "sha512-AAFUA5O1d83pIHEhJwWCq/RQcRukCkn/NSm2QsTEMle5f2hP0ChI2+3Xb051PZCkLryI/Ir1MVKviT2FIloaTQ==", "engines": { "node": ">=12" }, @@ -1368,9 +1368,9 @@ } }, "node_modules/rollup": { - "version": "3.28.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", - "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", + "version": "3.28.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.1.tgz", + "integrity": "sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -1389,9 +1389,9 @@ "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" }, "node_modules/sass": { - "version": "1.65.1", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.65.1.tgz", - "integrity": "sha512-9DINwtHmA41SEd36eVPQ9BJKpn7eKDQmUHmpI0y5Zv2Rcorrh0zS+cFrt050hdNbmmCNKTW3hV5mWfuegNRsEA==", + "version": "1.66.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.66.1.tgz", + "integrity": "sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -1502,9 +1502,9 @@ } }, "node_modules/typescript": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", - "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", + "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/favicon.ts b/src/favicon.ts index 272d319..7a6aa03 100644 --- a/src/favicon.ts +++ b/src/favicon.ts @@ -19,9 +19,10 @@ import orfIcon from "../assets/favicons/orf.png" import apaIcon from "../assets/favicons/apa.png" import facebookIcon from "../assets/favicons/facebook.svg" import heuteIcon from "../assets/favicons/heute.at.png" +import gmapsIcon from "../assets/favicons/gmaps.svg" -export function faviconByHostname(hostname: string): string | undefined { +export function faviconByHostname(hostname: string, pathname: string): string | undefined { switch (hostname) { case "www.ggg.at": @@ -71,4 +72,7 @@ export function faviconByHostname(hostname: string): string | undefined { if (hostname.includes("orf.at")) { return orfIcon } + if (hostname == "www.google.com" && pathname.startsWith("/maps/")) { + return gmapsIcon + } } diff --git a/src/text.ts b/src/text.ts index ac114c9..4eb39b2 100644 --- a/src/text.ts +++ b/src/text.ts @@ -25,7 +25,7 @@ export function displaySources(sources: Source[]) { img.width = img.height = 24 a.appendChild(img) a.href = s.url! // TODO: missing url - const favicon = faviconByHostname(a.hostname) + const favicon = faviconByHostname(a.hostname, a.pathname) if (favicon) { img.src = favicon }