Ajout road

This commit is contained in:
Ambulance Clerc
2022-06-30 16:22:05 +02:00
parent 55e53afc11
commit 3e6aa6b29a
3 changed files with 10 additions and 2 deletions

View File

@@ -62,6 +62,12 @@ class cls_caldav():
item.desc = event["DESCRIPTION"]
if "#" in item.desc:
item.done = True
if '{href=' in item.desc:
temp_str = item.desc.split('{href=')[1]
temp_str = temp_str.split('}')[0]
item.href = temp_str
item.desc = item.desc.replace("{href=" + item.href + "}","")
item.dtstart = event["DTSTART"].dt.strftime("%d.%m.%Y %H:%M")
item.dtstamp = int(event["DTSTART"].dt.strftime("%Y%m%d%H%M"))
print(item.dtstamp)
@@ -98,6 +104,7 @@ class _caldav_item():
str_end_time = ""
dtstamp = None
done = False
href = ""
def format_str_date(self):
self.str_start_date = datetime.strptime(self.dtstart,"%d.%m.%Y %H:%M").strftime("%d.%m")