Imagine having to create over a thousand individual events with different name, location, start time, end time and description in your team's Google Calendar. This can be a a tedious and very time consuming task. Are you looking for a smarter and more effective way to get the paperwork done?
AutomateGoogleCalendar is the tool that will get this task done worry-free!
This project utilises Selenium to scrap data on soccer events from http://www.tsisports.ca/. Then, it combines ressources from Google RESTful API (Google Sheet API and Google Calendar API) to create events in your own Google Calendar.
- First, clone this repository using:
git clone https://github.com/mlej8/AutomateGoogleCalendar.git
- Create a brand new virtual environment using the python version and dependencies specified in the pipfile.lock:
$ pipenv install --ignore-pipfile
- Activate virtual environment generated by pipenv:
$ pipenv shell
- Visit Google Developer Console and login using you Google Account at: https://console.developers.google.com/
- Create a new project named AutomateGoogleCalendar
- Enable Google Sheet API and Google Calendar API.
- Create a service account key and an OAuth 2.0 client IDs. Then, store these two credentials keys in AutomateGoogleCalendar/Credentials/.
- Run write_google_sheet.py to scrap data from http://www.tsisports.ca/ and write it in a Google Sheet named "FC Gatineau Schedule"
- Run oauth2_setup.py to get an Access token from Google. This script will store this access token at AutomateGoogleCalendar/Credentials/
- Run event_creator.py to create all the event in your Google Calendar
- Delete all events using delete_events.py
- Exit virtual environment
$ exit
- Selenium - Web Browser Automation Framework
- Google Calendar API - Module to work with Google Calendar
- Google Sheet API - Module to work with Google Sheets
- gspread - Module to work with Google Sheets
- googleapiclient.discovery - A client Library for Google's discovery based APIs.
- oauth2client.service_account - OAuth2Client Service account credentials Class
- Pickle - Module for serializing and de-serializing a Python object structure
- google_auth_oauthlib.flow - Module provides integration with requests-oauthlib for running the OAuth 2.0 Authorization Flow and acquiring user credentials
- datetime - Module to work with dates and times
- Michael Li