1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
39 lines
1.9 KiB
Python
39 lines
1.9 KiB
Python
#!/usr/bin/env python3
|
|
"""Frankfurt als Heimat-Hub in cities.json einfügen, falls noch nicht da."""
|
|
import json
|
|
from pathlib import Path
|
|
|
|
CITIES = Path(__file__).resolve().parents[1] / "assets" / "data" / "cities.json"
|
|
with CITIES.open(encoding="utf-8") as f:
|
|
cities = json.load(f)
|
|
if any(c["id"] == "frankfurt" for c in cities):
|
|
print("Frankfurt schon da."); raise SystemExit(0)
|
|
|
|
# Aus Wikidata / Wikipedia: Frankfurt am Main, größter Flughafen Deutschlands (FRA)
|
|
frankfurt = {
|
|
"id": "frankfurt", "title": "Frankfurt", "country": "Deutschland", "isCapital": False,
|
|
"lat": 50.1109, "lon": 8.6821, "population_million": 0.77,
|
|
"continent": "Europa", "timezone": "Europe/Berlin", "utcOffset": 1,
|
|
"infoText": {
|
|
"de": "Frankfurt am Main ist die Finanzmetropole Deutschlands und besitzt mit dem Flughafen Frankfurt (FRA) das größte Drehkreuz für interkontinentale Flüge in Mitteleuropa. Über 60 Millionen Passagiere/Jahr in 2024 — der wichtigste Hub für unsere Tour.",
|
|
"easy": "Frankfurt liegt in Deutschland. Hier ist ein sehr großer Flughafen. Viele Flüge in andere Länder starten in Frankfurt."
|
|
},
|
|
"imagePath": "../busfahrt/assets/data/../logistik/assets/cities/_original/frankfurt.png",
|
|
"level": 1,
|
|
"question": {
|
|
"prompt": {"de": "In welchem Land liegt Frankfurt?", "easy": "In welchem Land liegt Frankfurt?"},
|
|
"choices": ["Deutschland", "Österreich", "Schweiz"],
|
|
"correctIndex": 0
|
|
},
|
|
"questionContinent": {
|
|
"prompt": {"de": "Auf welchem Kontinent liegt Frankfurt?", "easy": "Auf welchem Kontinent liegt Frankfurt?"},
|
|
"choices": ["Europa", "Nordamerika", "Asien"],
|
|
"correctIndex": 0
|
|
},
|
|
}
|
|
cities.append(frankfurt)
|
|
cities.sort(key=lambda c: c["id"])
|
|
with CITIES.open("w", encoding="utf-8") as f:
|
|
json.dump(cities, f, ensure_ascii=False, indent=2); f.write("\n")
|
|
print(f"OK -- Frankfurt eingefuegt. Cities: {len(cities)}")
|