====== Google Calendar Manager ======
===== References =====
* https://gitlab.nervtech.org/nerv/nervhome/-/issues/4
* https://developers.google.com/calendar/api/quickstart/python?hl=fr
So first we need to activate the Google Calendar API in a google cloud project: https://console.cloud.google.com/apis/dashboard
=> I'm currently using the project **HomeCtrl**, but no real idea if that one is already enabled
It seems the correct project is rather **NervGoogleCtrlv2**. So activating the calendar API in this one.
I need to remember where I was already using the Google API to setup actions on the google home.
Found it in **NervHome/nvh/app/google_smart_home_test/google_home.py**, but this is a terrible mess. Maybe I should just create new credentials instead.
Will be really tricky the day I need to get back to that **smarthome** project...
For now creating a new Client OAuth called **CalManager**
Saving the credentials as **Security/calmanager_client_secret_964130851269-rpem3uhk8v8eujjiadg4rdamgv9rd89h.apps.googleusercontent.com.json**
Preparing the script and environment for the cal command:
cal_env:
inherit: default_env
packages:
- google-api-python-client
- google-auth-httplib2
- google-auth-oauthlib
cal:
notify: false
custom_python_env: cal_env
cwd: ${PROJECT_ROOT_DIR}
cmd: ${PYTHON} ${PROJECT_ROOT_DIR}/nvh/admin/cal_manager.py
python_path: ["${PROJECT_ROOT_DIR}", "${NVP_ROOT_DIR}"]
To select the appropriate scope to use: https://developers.google.com/calendar/api/auth?hl=fr
Informations sur l'API Calendar: https://developers.google.com/calendar/api/v3/reference/calendarList/list?hl=fr
=> Crap! I was planning to retrieve the public holidays directly from google calendar: Arrff, that's because we can display additional type of days on that calendar. See this page: https://support.google.com/calendar/answer/13748345?hl=fr&co=GENIE.Platform%3DDesktop
**OK**! Project completed for now. But eventually I will need to consider support for work package specification in events