Changement template caldav

This commit is contained in:
Ambulance Clerc
2022-06-20 00:55:41 +02:00
parent c6a3d4c589
commit 6a5bc4a280
2 changed files with 21 additions and 10 deletions

View File

@@ -46,7 +46,14 @@ class cls_caldav():
for event in recurring_ical_events.of(Calendar.from_ical(self.data)).at(today):
item = _caldav_item()
item.name = event["SUMMARY"]
if "/" in item.name:
arr = item.name.split("/")
item.key = arr[0]
item.name = arr[1]
item.desc = event["DESCRIPTION"]
if "*done*" in item.desc:
item.done = True
item.dtstart = event["DTSTART"].dt.strftime("%d.%m.%Y %H:%M")
item.dtend = event["DTEND"].dt.strftime("%d.%m.%Y %H:%M")
self.items.append(item)
@@ -69,11 +76,13 @@ class cls_caldav():
return self.data
class _caldav_item():
key = ""
name = ""
desc = ""
dtstart = None
dtend = None
dtstamp = None
done = False