Compare commits

..

No commits in common. "b46fcc77791a453176cecbe67f38039dbeb17083" and "1414d235e5f5a56ae03abdd22bd0da31cd9409cc" have entirely different histories.

View File

@ -50,7 +50,10 @@ def clean_street(street: str) -> str:
if not street:
return ""
# Убираем "Белгород г;" в начале
street = re.sub(r'^Белгород г;?\s*', '', street, flags=re.IGNORECASE)
# Разбиваем по ; и \n
parts = re.split(r'[;\n]+', street)
cleaned_lines = []
@ -111,7 +114,7 @@ def parse_and_save(data, file_path: Path, mode: str):
time_up = format_time(item.get("ScheduledTimeRemoval", ""))
lines.append(f"{street}\nВосстановление: ~{time_up}\n{'' * 30}")
file_path.write_text('\n'.join(lines), encoding='utf-8')
file_path.write_text('\n\n'.join(lines), encoding='utf-8')
def get_plan():