From 45eb5e6b21866b61abac2bf164ddb530ca9c782a Mon Sep 17 00:00:00 2001 From: fram3d Date: Thu, 8 Feb 2024 17:21:52 +0100 Subject: [PATCH] fix uid ical again --- prep.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prep.py b/prep.py index 957fb4b..2f54056 100755 --- a/prep.py +++ b/prep.py @@ -56,11 +56,12 @@ def build_ical(events: list[dict]) -> str: title = event["title"] location = event["location"] date = event["date"] + time = event["time"] + + uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2] date = str(date.year) + str(date.month).zfill(2) + str(date.day).zfill(2) created = str(today.year) + str(today.month).zfill(2) + str(today.day).zfill(2) + "T" + str(today.hour).zfill(2) + str(today.minute).zfill(2) + str(today.second).zfill(2) + "Z" - time = event["time"] date = date + "T" + time.replace(":", "") + "00" - uid = str(date.month).zfill(2) + str(date.day).zfill(2) + time[:2] event_template = "" with open("template/event.ical", "r") as file: