From 9f4f26b7ba07d0f9c7bf45adfc4a194331e10a48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Mon, 11 Nov 2024 10:57:41 -0800 Subject: [PATCH] Generate taginfo project file --- renderer/render_once.sh | 4 ++++ renderer/taginfo_template.json | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 renderer/taginfo_template.json diff --git a/renderer/render_once.sh b/renderer/render_once.sh index b975c9d..178b90a 100755 --- a/renderer/render_once.sh +++ b/renderer/render_once.sh @@ -93,6 +93,10 @@ done echo 'Waiting for all background jobs to finish' wait +echo 'Regenerating taginfo project file' +cat "$DIR/languages.txt" | sed -E 's/([-A-Za-z]+)/{"key": "name:\1", "object_types": ["node", "way", "relation", "area"]}/g' | jq -s '.' > "$DIR/languages.json" +jq -s '.[0].tags += .[1] | .[0]' "$DIR/taginfo_template.json" "$DIR/languages.json" > "$DIR/../static/taginfo.json" + echo 'Invalidating the CDN cache' aws cloudfront create-invalidation --distribution-id E1SJ64GZNQSV8M --invalidation-batch "{\"Paths\": {\"Quantity\": 1, \"Items\": [\"/*\"]}, \"CallerReference\": \"invalidation-$DATE\"}" diff --git a/renderer/taginfo_template.json b/renderer/taginfo_template.json new file mode 100644 index 0000000..687a2e0 --- /dev/null +++ b/renderer/taginfo_template.json @@ -0,0 +1,15 @@ +{ + "data_format": 1, + "project": { + "name": "OpenStreetMap U.S. Tile Service", + "description": "A vector tile server for community projects.", + "project_url": "https://github.com/osmus/tileservice/", + "doc_url": "https://tile.ourmap.us/", + "icon_url": "https://openstreetmap.us/img/osmus-logo.svg", + "contact_name": "OpenStreetMap U.S.", + "contact_email": "team@openstreetmap.us" + }, + "tags": [ + {"key": "name", "object_types": ["node", "way", "relation", "area"]} + ] +}