add links to ical events

This commit is contained in:
fram3d 2024-08-05 12:36:54 +02:00
parent 9063f5d854
commit bdc4bdc97e
Signed by: fram3d
GPG Key ID: 938920E709EEA32A

View File

@ -91,6 +91,7 @@ def build_ical(events: list[dict]) -> str:
location = event["location"]
date = event["date"]
time = event["time"]
url = event["link"]
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)
@ -104,6 +105,7 @@ def build_ical(events: list[dict]) -> str:
event_template = event_template.replace("<!--CREATED-->", created)
event_template = event_template.replace("<!--DATE-->", date)
event_template = event_template.replace("<!--TITLE-->", title)
event_template = event_template.replace("<!--URL-->", url)
events_ical += event_template
# Footer