From af65cde58fb97cf551f6e3e8c5144650c1e2ea9e Mon Sep 17 00:00:00 2001 From: Hugo Date: Mon, 7 Aug 2023 17:05:30 +0200 Subject: [PATCH] fix events path --- prep.py | 51 +++++++++++---------------------------------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/prep.py b/prep.py index b76db93..4c4b415 100644 --- a/prep.py +++ b/prep.py @@ -7,7 +7,7 @@ days = [ "Ponedeljak", "Utorak", "Sreda", - "Cetvrtak", + "Četvrtak", "Petak", "Subota", "Nedelja", @@ -70,9 +70,7 @@ events = load_events() events = sort_events(events) write_events(events) -start = "\n\n\n\n\n\n\n" -end="\n
DatumVremeMestoTema
" -future_events = [] +events = [] for event in events: date, time, location, title = event.split(", ") @@ -90,41 +88,14 @@ for event in events: else: future_event.append(" "+location.strip()+" ") future_event.append(" "+title+" ") - future_events.append("\n"+"\n".join(future_event)+"\n") + events.append("\n"+"\n".join(future_event)+"\n") -events = [] -events.append(start) +with open("pages/sr/events.html","wt") as file: + file.writelines(["

Događaji

\n", "\n", "\n"]) + file.writelines(events) + file.writelines(["
DatumVremeMestoTema
"]) -for event in future_events: - events.append(event) - -events.append(end) - -with open("pages/events.html","rt") as file: - html = file.readlines() - -new_html = [] - -i=0 -while i': - new_html.append(original_line) - for event in events: - new_html.append(event+"\n") - new_html.append(" \n") - while line!='': - i+=1 - line=html[i].strip() - i+=1 - while iEvents", "", "\n\n\n\n\n"]) +# file.writelines(events) +# file.writelines(["
DateTimePlaceTheme
"]) \ No newline at end of file