Link your Epitech calendar to your Google calendar.
- Clone this repository.
- Create a
config.json
file with the following content:
{
"CALENDAR_ID": "",
"USER_COOKIE": "",
"GetModules": false
}
Find it by going on the intra and going into dev console -> application -> cookies -> user
You need to copy the value inside the config json.
First things first, you can create an Epitech sub-calendar. This step is not mandatory, but creating a sub-calendar improves your general calendar clarity and its organisation. To do so, create a new calendar by clicking on this menu:
Then, select the Settings and sharing
menu option for this sub-calendar:
Press Ctrl+F
, search for Calendar ID
in the page and copy-paste the address [email protected]
in the config.json
file for the CALENDAR_ID
key.
If you want to retrieve modules' timeline in addition of projects' one, replace false
by true
in the config.json
file for the GetModules
key.
In the end, your configuration file should look like this:
{
"CALENDAR_ID": "[email protected]",
"USER_COOKIE": "XXXXXXXX",
"GetModules": false
}
Go to https://developers.google.com/calendar/quickstart/python and click on "Enable the Google Calendar API". Create a project and download the client configuration. The credentials.json
must be located in the program directory.
Run sudo pip3 install --upgrade google-api-python-client oauth2client
to install the Google API library, and sudo pip3 install -r requirements.txt
to install all other dependencies.
If you do not have access to an internet browser (e.g., in a server context) run python3 main.py --noauth_local_webserver
otherwise run python3 main.py
to execute the program. You will need to connect to your Google account the first time.
You can setup a crontab to synchronise your Epitech calendar regularly. (https://crontab.guru)