Automates:
- extraction of lessons/exams from GEOP
- ICS export (
exportGEOP.ics) - synchronization to a dedicated Google Calendar (create / update / delete)
This project is designed to run on Windows and can auto-run at login.
- 🚀 Setup: sections 2-9
- 🔁 Auto-run at login: section 11
- 🛠 Troubleshooting: section 13
- 🔒 Security: section 14
At each run:
- Logs into GEOP with Selenium.
- Reads weekly events until
END_DATE. - Builds a normalized event list (title, start, end, location).
- Exports an ICS file (
exportGEOP.ics). - Syncs with Google Calendar:
- creates new events
- updates modified events
- deletes events removed from GEOP
- Windows 10/11
- Python 3.10+
- Google Chrome installed
- A Google account
- Access to your GEOP portal
git clone https://github.com/alerizzidev/GeopImporter.git
cd GeopImporterpython -m venv geop-env
.\geop-env\Scripts\activatepip install selenium webdriver-manager colorama google-api-python-client google-auth-httplib2 google-auth-oauthlib- Rename
scriptexample.pytoscript.py. - Open
script.pyand set:
# GEOP
URL = "https://your-geop-domain.example/"
USERNAME = "YOUR_GEOP_USERNAME"
PASSWORD = "YOUR_GEOP_PASSWORD"
END_DATE = datetime(2026, 7, 31)
# Google Sync
GOOGLE_SYNC_ENABLED = True
GOOGLE_CALENDAR_ID = "YOUR_GOOGLE_CALENDAR_ID"
GOOGLE_CLIENT_SECRET_FILE = "google_client_secret.json"
GOOGLE_TOKEN_FILE = "google_token.json"
GOOGLE_STATE_FILE = "sync_state.json"Notes:
- Use a dedicated Google calendar for this integration.
- Keep
GOOGLE_SYNC_ENABLED = Truefor synchronization. - As of today,
scriptexample.pyusesEND_DATE = datetime(2026, 7, 31). - You can customize this date based on the length of your academic year.
- If GEOP schedule changes, set
END_DATEto about 1 week after the last event visible on GEOP.
In Google Cloud Console:
- Create/select a project.
- Enable Google Calendar API.
- Configure OAuth consent screen.
- Create OAuth client ID of type Desktop app.
- Download the JSON credentials file.
Place that file in the project root as:
google_client_secret.json
In Google Calendar Web:
- Settings
- Select your dedicated calendar
- "Integrate calendar"
- Copy "Calendar ID"
Paste it into GOOGLE_CALENDAR_ID in script.py.
.\geop-env\Scripts\python.exe .\script.pyOn first run:
- browser login/consent (when the scirpt finish) auto opens for Google OAuth
google_token.jsonis created
After this, next runs reuse token automatically.
Generated at runtime:
exportGEOP.icsgoogle_token.jsonsync_state.json
Do not commit these files.
Create file:
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\GEOP-Sync-Auto.cmd
Content:
@echo off
cd /d C:\path\to\your\repo
C:\path\to\your\repo\geop-env\Scripts\python.exe C:\path\to\your\repo\script.pyNow synchronization starts every time you log in.
Sync logic uses local sync_state.json:
- if event is new -> create on Google
- if event changed -> update on Google
- if event removed from GEOP -> delete on Google
This keeps Google Calendar aligned with GEOP changes.
- Check
URL,USERNAME,PASSWORD - Verify you are in the right GEOP calendar view
- Increase timeout if GEOP is slow
- Check
google_client_secret.jsonexists in project root - Check Calendar API is enabled
- Delete invalid
google_token.jsonand rerun
- Ensure your Google user is allowed in OAuth test users
- Ensure
GOOGLE_CALENDAR_IDbelongs to your account or shared with write access
- Delete
sync_state.jsonand rerun once to rebuild mapping
- Never commit personal credentials.
- Keep
google_client_secret.json,google_token.json, and any personal files local-only. - Rotate credentials immediately if exposed.
- Keep script configured once.
- Let it auto-run at login.
- Optionally run manually anytime for immediate refresh.
- Use Google Calendar app on iPhone with the same account to see updates.
Copyright (c) Alessandro Rizzi.
This project can be used, copied, and adapted by anyone for personal or educational use, but attribution must be preserved. Do not remove the original author credit and do not present this project as your own original work.
