forked from Decentrala/website
chage incorrect filenames in prep.py
This commit is contained in:
parent
f3e3abf97b
commit
234c0d576a
10
prep.py
10
prep.py
@ -48,7 +48,7 @@ def is_past_event(event):
|
||||
|
||||
def load_events():
|
||||
events = []
|
||||
with open("dogadjaji.txt", "rt") as file:
|
||||
with open("dogadjaji.csv", "rt") as file:
|
||||
file.readline()
|
||||
for event in file.readlines():
|
||||
event = event.strip()
|
||||
@ -57,7 +57,7 @@ def load_events():
|
||||
return events
|
||||
|
||||
def write_events(events):
|
||||
with open("dogadjaji.txt", "wt") as file:
|
||||
with open("dogadjaji.csv", "wt") as file:
|
||||
file.write("datum, vreme, lokacija, tema\n")
|
||||
for event in events:
|
||||
file.write(event+"\n")
|
||||
@ -100,7 +100,7 @@ for event in future_events:
|
||||
|
||||
events.append(end)
|
||||
|
||||
with open("pages/dogadjaji.html","rt") as file:
|
||||
with open("pages/events.html","rt") as file:
|
||||
html = file.readlines()
|
||||
|
||||
new_html = []
|
||||
@ -126,5 +126,5 @@ while i<len(html):
|
||||
i+=1
|
||||
|
||||
|
||||
with open("pages/dogadjaji.html","wt") as file:
|
||||
file.writelines(new_html)
|
||||
with open("pages/events.html","wt") as file:
|
||||
file.writelines(new_html)
|
||||
|
Loading…
Reference in New Issue
Block a user