forked from cccb-website-team/www
Compare commits
7 changed files with 46 additions and 31 deletions
|
|
@ -1,15 +0,0 @@
|
|||
---
|
||||
title: "Kein DI.Day am 5. Juli im CCCB"
|
||||
date: 2026-07-04T12:00:00+02:00
|
||||
showHero: false
|
||||
tags: ["di.day", "Ankündigung"]
|
||||
---
|
||||
|
||||
**Kurzfristige Änderung:** Der [Digital Independence Day](/veranstaltungen/didit/) findet am **Sonntag, dem 5. Juli 2026, nicht** im Chaos Computer Club Berlin (Marienstraße 11) statt.
|
||||
|
||||
Wer trotzdem am DI.Day teilnehmen und den Weg in die digitale Unabhängigkeit weitergehen möchte, ist herzlich bei den anderen Berliner Veranstaltungen willkommen:
|
||||
|
||||
- [„Let's DID it!" mit Linux & Sommerfest der BELUG](https://f.termine.di.day/events/ee48fdda-a134-4f27-932e-b87c7a9fa24a) in der c-base
|
||||
- [DI.Day im Stadtschloss Moabit](https://f.termine.di.day/events/41ab17fe-05ab-4308-9abb-d38d9485fd4f)
|
||||
|
||||
Weitere Termine und Orte findet ihr wie immer auf [termine.di.day](https://termine.di.day/).
|
||||
|
|
@ -4,7 +4,7 @@ subtitle: "Digital Independence Day im CCCB"
|
|||
date: 2026-01-04T12:23:00+01:00
|
||||
dtstart: 20260104T122300
|
||||
dtend: 20260104T174200
|
||||
rrule: "FREQ=MONTHLY;INTERVAL=2;BYDAY=1SU;WKST=MO;UNTIL=20260503T235959Z"
|
||||
rrule: "FREQ=MONTHLY;INTERVAL=2;BYDAY=1SU;WKST=MO"
|
||||
menu:
|
||||
main:
|
||||
parent: "Veranstaltungen"
|
||||
|
|
|
|||
1
layouts/_default/baseof.calendar.html
Normal file
1
layouts/_default/baseof.calendar.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{ block "main" . }}{{ .Content }}{{ end }}
|
||||
21
layouts/_default/list.calendar.html
Normal file
21
layouts/_default/list.calendar.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//CCCB//Calendar//DE
|
||||
{{ with .Title }}
|
||||
X-WR-CALNAME:{{ . }}
|
||||
{{ end }}
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
{{ range .Pages }}
|
||||
{{ if .Date }}
|
||||
BEGIN:VEVENT
|
||||
UID:{{ .File.UniqueID }}@berlin.ccc.de
|
||||
DTSTAMP:{{ .Date.Format "20060102T150405Z" }}
|
||||
DTSTART:{{ .Date.Format "20060102T150405Z" }}
|
||||
SUMMARY:{{ .Title }}
|
||||
DESCRIPTION:{{ .Summary | plainify }}
|
||||
URL:{{ .Permalink }}
|
||||
END:VEVENT
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
END:VCALENDAR
|
||||
12
layouts/_default/list.xml.html
Normal file
12
layouts/_default/list.xml.html
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<events>
|
||||
{{ range .Pages }}
|
||||
<event>
|
||||
<title>{{ .Title }}</title>
|
||||
<link>{{ .Permalink }}</link>
|
||||
<date>{{ .Date.Format "2006-01-02" }}</date>
|
||||
<description>{{ .Summary | plainify }}</description>
|
||||
{{ with .Params.location }}<location>{{ . }}</location>{{ end }}
|
||||
</event>
|
||||
{{ end }}
|
||||
</events>
|
||||
21
layouts/_default/single.calendar.html
Normal file
21
layouts/_default/single.calendar.html
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//CCCB//Calendar//DE
|
||||
{{ with .Title }}
|
||||
X-WR-CALNAME:{{ . }}
|
||||
{{ end }}
|
||||
CALSCALE:GREGORIAN
|
||||
METHOD:PUBLISH
|
||||
{{ if .Date }}
|
||||
BEGIN:VEVENT
|
||||
UID:{{ .File.UniqueID }}@berlin.ccc.de
|
||||
DTSTAMP:{{ .Date.Format "20060102T150405Z" }}
|
||||
DTSTART:{{ .Date.Format "20060102T150405Z" }}
|
||||
{{ with .Params.event.end }}DTEND:{{ dateFormat "20060102T150405Z" . }}{{ end }}
|
||||
SUMMARY:{{ .Title }}
|
||||
DESCRIPTION:{{ .Summary | plainify }}
|
||||
URL:{{ .Permalink }}
|
||||
{{ with .Params.location }}LOCATION:{{ . }}{{ end }}
|
||||
END:VEVENT
|
||||
{{ end }}
|
||||
END:VCALENDAR
|
||||
|
|
@ -3,23 +3,13 @@
|
|||
import sys
|
||||
import logging
|
||||
import locale
|
||||
from dateutil.parser import parse as _parse
|
||||
from dateutil.parser import parse
|
||||
from datetime import datetime, timedelta
|
||||
from dateutil.rrule import rruleset, rrulestr
|
||||
|
||||
import icalendar
|
||||
|
||||
|
||||
def parse(value):
|
||||
# Some templates emit DTSTART with a trailing "Z" (e.g. 20260507T190000Z)
|
||||
# which produces tz-aware datetimes, while others emit naive local times.
|
||||
# Normalize to naive so comparisons and sorting don't mix the two.
|
||||
dt = _parse(value)
|
||||
if dt.tzinfo is not None:
|
||||
dt = dt.replace(tzinfo=None)
|
||||
return dt
|
||||
|
||||
|
||||
def vevent_to_event(event, rrstart=None):
|
||||
if rrstart == None:
|
||||
begin = parse(event["DTSTART"].to_ical())
|
||||
|
|
@ -44,10 +34,7 @@ def parse_recurring_event(event, start, end):
|
|||
logging.info(f"Processing recurring event {event['SUMMARY'].to_ical().decode('utf-8')}")
|
||||
dtstart = parse(event["DTSTART"].to_ical())
|
||||
rs = rruleset()
|
||||
# dtstart is normalized to naive local time above; pass ignoretz so a
|
||||
# tz-aware UNTIL (RFC 5545 requires UTC for it) is treated as naive too,
|
||||
# otherwise dateutil rejects the naive/aware mismatch.
|
||||
rs.rrule(rrulestr(event["RRULE"].to_ical().decode("utf-8"), dtstart=dtstart, ignoretz=True))
|
||||
rs.rrule(rrulestr(event["RRULE"].to_ical().decode("utf-8"), dtstart=dtstart))
|
||||
if "EXDATE" in event.keys():
|
||||
for exdate in event["EXDATE"]:
|
||||
rs.exdate(parse(exdate.to_ical()))
|
||||
|
|
|
|||
Loading…
Reference in a new issue