migrate.py: update address migration
This commit is contained in:
@ -110,6 +110,7 @@ ORT_NAMES: Dict[str, Optional[str]] = {
|
||||
'Znaim': None,
|
||||
'Obersdorf': None,
|
||||
'Sechshaus': None,
|
||||
'Rußbach': None,
|
||||
}
|
||||
|
||||
STREET_NAMES: Dict[str, str] = {
|
||||
@ -148,6 +149,8 @@ STREET_NAMES: Dict[str, str] = {
|
||||
'Manhartsbr.Straße': 'Manhartsbrunner Straße',
|
||||
'Maria Lourd Weg': 'Maria-Lourd-Weg',
|
||||
'U. Weißgasse Straße': 'Untere Weißgerberstraße',
|
||||
'Dr. Josef-Levit-Straße': 'Dr.-Josef-Levit-Straße',
|
||||
'Karl Katschthaler-Straße': 'Karl-Katschthaler-Straße',
|
||||
}
|
||||
|
||||
|
||||
@ -892,7 +895,7 @@ def migrate_members(in_dir: str, out_dir: str) -> None:
|
||||
if address.startswith('Haus Nr.') or \
|
||||
address.startswith('Nr. ') or \
|
||||
address.startswith('Nr ') or \
|
||||
address.isdigit() or (len(address) > 1 and address[:-1].isdigit()):
|
||||
(len(address) > 0 and address[0].isdigit()):
|
||||
address = ort.title() + ' ' + address.split(' ')[-1]
|
||||
address = address.replace('strasse', 'straße').replace('strassse', 'straße')\
|
||||
.replace('Strasse', 'Straße').replace('Str.', 'Straße').replace('stasse', 'straße')\
|
||||
|
Reference in New Issue
Block a user