-
-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
Luca Dall'Acqua edited this page Dec 12, 2024
·
7 revisions
- Python 3.6 or higher
- Google account
- Access to ClasseViva account
First, clone the repository to your local machine:
git clone https://github.com/LucaCraft89/CVVCalendarSync.git
cd CVVCalendarSync
- Go to the Google Cloud Console.
- Create a new project:
- Click on the project dropdown at the top of the page.
- Click "New Project".
- Enter the project name and other details, then click "Create".
- Enable the Google Calendar API for your project:
- In the Google Cloud Console, go to "APIs & Services" > "Library".
- Search for "Google Calendar API".
- Click on "Google Calendar API" and then click "Enable".
- Create a service account:
- Go to "IAM & Admin" > "Service Accounts".
- Click "Create Service Account".
- Fill in the details and click "Create".
- Assign the "Editor" role to the service account.
- Click "Done".
- Create a JSON key for the service account:
- Click on the service account you just created.
- Go to the "Keys" tab.
- Click "Add Key" > "Create New Key".
- Select "JSON" and click "Create". Save the JSON file to your project directory.
- Create a new Google Calendar:
- Go to Google Calendar.
- Click on the plus sign next to "Other calendars".
- Select "Create new calendar".
- Fill in the calendar name and other details, then click "Create calendar".
- Share your Google Calendar with the service account:
- Go to Google Calendar.
- Click on the three dots next to the calendar you want to share.
- Click "Settings and sharing".
- Under "Share with specific people", add the service account email and give it "Make changes to events" permission.
- Rename
config.example.json
toconfig.json
:
mv config.example.json config.json
- Edit
config.json
and fill in the required fields:
{
"user_id": "your_classeviva_user_id",
"user_pass": "your_classeviva_password",
"calendar_id": "your_google_calendar_id",
"credentials_file": "credentials.json" # NOTE: put the file in the same directory and rename it to "credentials.json"
}
Install the required Python packages:
pip install -r requirements.txt
Run the script to sync your ClasseViva agenda with Google Calendar:
python CVVCalendarSync.py
- Docker with compose https://docs.docker.com/engine/install/
docker compose up -d
NOTE: Logs are not yet implemented
If you encounter any issues, please check the error messages and ensure that all configurations are correct. You can also refer to the Google Calendar API documentation for more details.