icaly is a tiny Flask application that turns the public timeline at https://goo.ogrodje.si/timeline
into an auto-updating iCalendar feed. It exposes a Google Calendar–friendly .ics endpoint and a
companion web page where you can preview upcoming events before subscribing.
The service is serving requests at https://icaly.ogrodje.si/calendar.ics
- Fetches and caches events from the timeline API every five minutes to minimise upstream traffic.
- Serves a standards-compliant
calendar.icsfeed with sanitised titles, descriptions, and links. - Provides a
/api/eventsJSON endpoint and a lightweight landing page that builds the Google Calendar subscription URL for you. - Adds secure headers (CSP, X-Frame-Options, etc.) and avoids leaking internal error messages.
- Python 3.12 (earlier 3.11+ may work but is not tested)
pipfor dependency management
git clone <this-repo-url>
cd dogodki-google-cal
python3 -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txtYou can pin additional dependencies or tweak cache timings by editing
app.py.
Bind the server to localhost on the default port (3000):
source .venv/bin/activate
python app.pyVisit http://127.0.0.1:3000/ to preview the events and grab the calendar link.
To run on a custom port, set PORT when starting the app:
PORT=9991 python app.pyThe /calendar.ics path is what Google Calendar (or any CalDAV client) should subscribe to.
The built-in Flask development server is convenient for local use but not recommended for production. For longer-term hosting:
- Keep the app behind a production WSGI server (e.g.,
gunicornoruwsgi). - Terminate TLS in front of the service so calendar clients fetch the feed securely.
- Configure health checks against
/healthzto ensure the timeline fetch remains healthy.
This project – architecture, code, and documentation – was fully generated with the help of OpenAI Codex.