- HTML 98.7%
- Python 1.2%
|
|
||
|---|---|---|
| eventdb | ||
| output | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| CHANGELOG.md | ||
| CLAUDE.md | ||
| compose.yaml | ||
| deploy.sh | ||
| Dockerfile | ||
| entrypoint.sh | ||
| eventdb.toml | ||
| inbox.md | ||
| LICENCE | ||
| LICENSE | ||
| Makefile | ||
| myproject.toml | ||
| pyproject.toml | ||
| README.md | ||
| tickets.org | ||
| uv.lock | ||
mr-eventdb
Generates an ICS calendar, RSS feed, JSON export and a static HTML page from mr-eventdb-data data.
Live at eventdb.mayer.rocks
Features
- Multilingual — 12 languages (de, en, nl, fr, it, es, pl, da, el, et, lv, lt) with automatic browser language detection
- Interactive map — Leaflet/OpenStreetMap with MarkerCluster, tag filters, and past event toggle
- Search & filter — full-text search and tag-based filtering across all event tables
- Countdown — "in X days" / "today" / "tomorrow" for upcoming events
- Month pages — separate page per month for the next 12 months
- Venue links — venue names linked to their websites from locationdb
- ICS calendar — subscribable calendar with all-day multi-day events
- RSS feeds — per-language feeds with upcoming events
- JSON export — machine-readable export of all events
- Duplicate detection — skips imported events that match manual entries (by URL, domain+date, or name+date)
- Dark mode — respects system preference
Prerequisites
- Python >= 3.11
- uv
Usage
Build
uv run eventdb-build
Reads .rec files from ../mr-eventdb-data/data/ and generates:
| Output | Description |
|---|---|
output/index.html |
Root page with browser language detection redirect |
output/{lang}/index.html |
Main event listing with search, filters, countdown |
output/{lang}/map.html |
Interactive map with tag filters and past event toggle |
output/{lang}/YYYY-MM.html |
Month pages for the next 12 months |
output/{lang}/feed.xml |
RSS feed with upcoming events |
output/events.ics |
ICS calendar (shared across languages) |
output/events.json |
JSON export of all events |
output/favicon.svg |
Favicon |
Import ICS feeds
uv run eventdb-import
Fetches ICS feeds configured in ../mr-eventdb-data/data/feeds.rec, extracts upcoming events, writes them to imported.rec, and adds new cities/venues to the locationdb.
Export JSON
uv run eventdb-export
Exports all events as JSON to output/events.json.
URL-Checker
uv run eventdb-urlcheck
Checks all URLs in event data for reachability.
Adding a new language
Add entries to the three dicts in eventdb/translations.py (LANGUAGES, MONTH_SHORT/MONTH_FULL, STRINGS). The build will automatically generate a new subdirectory and include it in the language switcher and browser detection.
Architecture
eventdb/
├── build.py # main build orchestrator
├── models.py # Event dataclass
├── rec_parser.py # recutils parser for events, locations, tags
├── html_gen.py # HTML generation (main page, month pages, map)
├── ics_gen.py # ICS calendar generation
├── rss_gen.py # RSS feed generation
├── export.py # JSON export
├── translations.py # i18n strings, month names, language config
├── feed_import.py # ICS feed importer
├── url_check.py # URL reachability checker
└── favicon.svg # calendar emoji favicon
Data sources
| File | Description |
|---|---|
events.rec |
Main event database |
camp.rec |
CCC Camp series (projected dates) |
congress.rec |
Chaos Communication Congress series |
zeitumstellung.rec |
DST changes (MEZ/MESZ) |
schnitzels.rec |
SchnitzelS monthly meetup series + Auswärtsschnitzel |
imported.rec |
Auto-generated from ICS feeds (do not edit manually) |
feeds.rec |
ICS feed URLs for automatic import |
External databases (submodules in mr-eventdb-data)
- project-locationdb — city/venue coordinates and website URLs
- project-tagdb — tag definitions with colors
Deployment
A Docker container clones both repos, builds the site, and uploads the result via SFTP. It runs once at startup and then daily via cron. The image is built locally on the NAS via podman compose build.
podman compose up -d
Configuration via environment variables:
| Variable | Description | Default |
|---|---|---|
SFTP_HOST |
Upload target host | — |
SFTP_USER |
SFTP username | — |
SFTP_PATH |
Remote path for the site | — |
SFTP_PORT |
SFTP port | 22 |
SFTP_SSH_KEY |
Private SSH key for SFTP (content) | — |
FORGEJO_SSH_KEY |
Private SSH key for git clone (content) | — |
CRON_SCHEDULE |
Cron expression for rebuild | 0 4 * * * |
See .env.example for a template.
Make targets
| Target | Description |
|---|---|
make build |
Build the site |
make test |
Run pytest test suite |
make clean |
Remove output directory |