Commit 0ba04a5f authored by Tarik Graba's avatar Tarik Graba 😷
Browse files

Better when everything is written in one language

parent 17baff68
......@@ -38,16 +38,16 @@ cal = Calendar()
cal['summary'] = SUMMARY
with open(CSV_FNAME) as csvfile:
seances = csv.reader(csvfile, delimiter=';', quotechar='"')
lines = csv.reader(csvfile, delimiter=';', quotechar='"')
# Skip the header
entete = next(seances)
for seance in seances:
header = next(lines)
for line in lines:
event = Event()
description = seance[6]
date_debut = " ".join([seance[0], seance[2]])
date_fin = " ".join([seance[0], seance[3]])
ddate_d = date_locale.localize(datetime.strptime(date_debut, date_fmt))
ddate_f = date_locale.localize(datetime.strptime(date_fin , date_fmt))
description = line[6]
date_start = " ".join([line[0], line[2]])
date_end = " ".join([line[0], line[3]])
ddate_d = date_locale.localize(datetime.strptime(date_start, date_fmt))
ddate_f = date_locale.localize(datetime.strptime(date_end , date_fmt))
event.add('summary', description)
event.add('dtstart', ddate_d)
event.add('dtend', ddate_f)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment