refakotorálás előtti állapot

This commit is contained in:
Roo
2026-03-10 07:34:01 +00:00
parent 4e40af8a08
commit 0304cb8142
39 changed files with 1552 additions and 125 deletions

View File

@@ -0,0 +1,24 @@
# MB 2.0: Strukturált adat-szótár a források egységesítéséhez
VEHICLE_MAPPING = {
"os-vehicle-db": {
"brand": "make",
"model": "model",
"year": "year",
"specs": {
"engine_hp": "specs.engine.hp",
"fuel": "specs.engine.fuel",
"body": "specs.body.type"
}
}
# Ide jönnek majd a carquery és fipe mappolások
}
def normalize_make(make: str) -> str:
""" Egységes márkanevek (pl. Mercedes-Benz vs Mercedes) """
m = make.upper().strip()
synonyms = {
"MERCEDES": "MERCEDES-BENZ",
"VW": "VOLKSWAGEN",
"ALFA": "ALFA ROMEO"
}
return synonyms.get(m, m)