Automated event management system that generates iCalendar files from YAML definitions with template inheritance.
Events are defined in YAML files. All YAML files are concatenated - order and file names don't matter.
Template inheritance via templates:
# Template definition
lecture_hall_A:
template: true
location: Lecture Hall A
x: 321
y: 321
# Event using template
lecture_1:
templates: [lecture_hall_A]
summary: Introduction to Programming
dtstart: 2024-01-15T10:00:00Result after parsing:
{
"lecture_1": {
"name": "lecture_1",
"location": "Lecture Hall A",
"x": 321,
"y": 321,
"summary": "Introduction to Programming",
"dtstart": "2024-01-15T10:00:00"
}
}- normal events -
YYYY-MM.yaml- ordered from earliest to latest - event types (lecture, kernel starter, etc.) -
event_types/*.yaml - locations -
locations/*.yaml
Templates (template: true) are excluded from final output but provide scaffolding for inheritance.
- Define events in
./resources/*.yaml - Parse YAML files → consolidated dictionary
- Export dictionary →
./artifacts/events.ical - Auto-commit via GitHub Action on every main branch commit
- Subscribe in Google Calendar using raw GitHub URL:
https://raw.githubusercontent.com/kni-kernel/kernel-events-ical/refs/heads/main/artifacts/events.ical
Triggers on push to main (excluding bot commits), regenerates events.ical, and commits changes.
pip install -r requirements.txtpython src/post_merge_hook.pyOutput: ./artifacts/events.ical
Event Properties that should be in every non-template event after template resolution:
name- should be unique, taken from events' top-level keystitle- Event title, if not specified, name is useddtstart- Start datetime (ISO 8601:2024-01-15T10:00:00)dtend- End datetime (or useduration)duration- Duration string (2h,30m,1h30m)location- Event locationdescription- Event descriptionurl- Related URLstatus- should be one ofCONFIRMED,TENTATIVE,CANCELLED(case-insensitive)
Events should have either dtstart or dtend, not neither, not both. All fields are optional except for these and dtend.
Add this URL to your calendar app:
https://raw.githubusercontent.com/kni-kernel/kernel-events-ical/refs/heads/main/artifacts/events.ical
- GitHub Pages for embedded-calendar view, events list view (or on official kernel site)
- Auto-publish to Facebook events
- Discord/Instagram/E-mail announcements
- Messenger bot notifications
- Unit tests, for now it is fine without them, but will come in handy once things go more complex
src/parser.py- YAML resource loader with templates resolutionsrc/ical_gen.py- RFC 5545 iCalendar generatorsrc/post_merge_hook.py- Orchestration script (parse → generate → write iCal artifacts).github/workflows/generate-ical.yml- GitHub Action for automatic regeneration
# Test full pipeline locally
python src/post_merge_hook.pyIt is recommended that you do not regenerate events and git add artifacts/events.ical yourself, but rely on the gh action post-commit hook.