mlej8 / AutomateGoogleCalendar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GSuite

AutomateGoogleCalendar

Why automate Google Calendar?

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.

Getting Started

Prerequisites

  1. First, clone this repository using:
git clone https://github.com/mlej8/AutomateGoogleCalendar.git
  1. Create a brand new virtual environment using the python version and dependencies specified in the pipfile.lock:
$ pipenv install --ignore-pipfile
  1. Activate virtual environment generated by pipenv:
$ pipenv shell

Create Google Developer Console Project

  1. Visit Google Developer Console and login using you Google Account at: https://console.developers.google.com/
  2. Create a new project named AutomateGoogleCalendar
  3. Enable Google Sheet API and Google Calendar API.
  4. Create a service account key and an OAuth 2.0 client IDs. Then, store these two credentials keys in AutomateGoogleCalendar/Credentials/.

Running the project

  1. Run write_google_sheet.py to scrap data from http://www.tsisports.ca/ and write it in a Google Sheet named "FC Gatineau Schedule"
  2. Run oauth2_setup.py to get an Access token from Google. This script will store this access token at AutomateGoogleCalendar/Credentials/
  3. Run event_creator.py to create all the event in your Google Calendar
  4. Delete all events using delete_events.py

Exit Virtual Environment

  1. Exit virtual environment
$ exit

Built With

Authors

  • Michael Li

About


Languages

Language:Python 100.0%