forked from Decentrala/website
Support for commas
This commit is contained in:
parent
25662d7bda
commit
f9713e7ee0
3
prep.py
3
prep.py
@ -9,9 +9,10 @@ DAYS_EN = ["MON ", "TUE", "WED", "THU", "FRI", "SAT", "SUN"]
|
|||||||
def load_events(csv_path:str) -> list[dict]:
|
def load_events(csv_path:str) -> list[dict]:
|
||||||
events = []
|
events = []
|
||||||
with open(csv_path) as csv_file:
|
with open(csv_path) as csv_file:
|
||||||
csv_reader = csv.reader(csv_file)
|
csv_reader = csv.reader(csv_file, skipinitialspace=True)
|
||||||
next(csv_reader, None)
|
next(csv_reader, None)
|
||||||
for event in csv_reader:
|
for event in csv_reader:
|
||||||
|
print(event)
|
||||||
event_date = event[0]
|
event_date = event[0]
|
||||||
event_date_parsed = datetime.strptime(event_date, "%d-%m-%Y").date()
|
event_date_parsed = datetime.strptime(event_date, "%d-%m-%Y").date()
|
||||||
event_time = event[1]
|
event_time = event[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user