docker run -it --rm \
-e "TZ=Europe/Berlin" \
-v "$PWD/config:/config" \
pschmitt/gcal-import-ics:latest \
"My Personal Calendar" \
/data/calendar.ics
and the main star of the show is 🌟 gcal_import.py
git clone https://github.com/pschmitt/gcal-import-ics
cd gcal-import-ics
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
You will need the following:
- Your calendar ID (or its name)
- a JSON credentials file. See here for instructions.
python3 gcal_import.py \
--debug \
-c ./credentials/client_secret_blablablabla.apps.googleusercontent.com.json \
-t ./credentials/gcal.token \
-p "PROXY=socks5h://corp.acme.com:8080" \
"$GOOGLE_CALENDAR_NAME_OR_ID" \
"$ICS_FILE_PATH_OR_URL"
python3 gcal_import.py \
--debug \
-c ./credentials/client_secret_blablablabla.apps.googleusercontent.com.json \
-t ./credentials/gcal.token \
-p "PROXY=socks5h://corp.acme.com:8080" \
--confluence-url https://confluence.acme.com \
--confluence-username admin \
--confluence-password somePAssword01 \
--confluence-calendars "Team Calendar" \
--confluence-calendars "Company events" \
--confluence-calendar-prefix "Work: "
- https://groups.google.com/g/google-apps-manager/c/tgIAB35I5EE?pli=1
- Google Calendar seems to be unable to fetch ics files behind basic auth
- 🚧 Fix status for some imported events (they are created with status=cancelled)
- Requests proxy option
- Delete unknown events
- With an optional date parameter (ie only delete future events)
- All-day events
- Attendees
- Reminders
- Store metadata ("imported by gcal_import.py") somewhere (in source? organizer? description?)
- Clear calendar before import (optional)
- Wait and retry when rate-limitted
- Optionally ignore SEQUENCE and always update
- Allow passing in the calendar name, instead of the ID
- Support recurring event instances
- Allow settings args with environment variables
- Confluence calendar sync