From 4d4fd6d4d3a0ddacd0d795e78b0d79c0e29dc1ad Mon Sep 17 00:00:00 2001 From: fram3d Date: Thu, 8 Feb 2024 17:19:13 +0100 Subject: [PATCH] fix uid in ical --- prep.py | 2 ++ template/event.ical | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/prep.py b/prep.py index 5e2641f9..957fb4b2 100755 --- a/prep.py +++ b/prep.py @@ -60,10 +60,12 @@ def build_ical(events: list[dict]) -> str: 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: event_template += file.read() + event_template = event_template.replace("", uid) event_template = event_template.replace("", created) event_template = event_template.replace("", date) event_template = event_template.replace("", title) diff --git a/template/event.ical b/template/event.ical index 4ec8954d..80fa0b84 100644 --- a/template/event.ical +++ b/template/event.ical @@ -1,5 +1,5 @@ BEGIN:VEVENT -UID:calendar.462701.field_date_time.0@radar.squat.net +UID:calendar..field_date_time.0@radar.squat.net DTSTAMP: CREATED: DTSTART;TZID=Europe/Belgrade: