Skip to content

Latest commit

 

History

History
56 lines (51 loc) · 1.71 KB

File metadata and controls

56 lines (51 loc) · 1.71 KB

Codeforces → Google Calendar

Automatically sync upcoming Codeforces contests to your Google Calendar.

(This tool is in Testing mode, email me at (sjce.sughosh@gmail.com) to add your gmail for Test users)

Features

  • Fetches live contest data from the Codeforces API.
  • Creates Google Calendar events with:
    • Contest title
    • Start and end time
    • Reminder (15 min before)
  • Works with Task Scheduler (Windows) for automation.

Setup Instructions

1️. Clone this repo

git clone https://github.com/YOUR_USERNAME/CodeForces2Calendar.git
cd CodeForces2Calendar

2. Install dependencies

pip install -r requirements.txt

3. Enable Google Calendar API

  1. Go to Google Cloud Console
  2. Create a new project (e.g., CodeForcesCalendar).
  3. Enable the Google Calendar API.
  4. Create OAuth 2.0 credentials → download the credentials.json file. (Rename the file to "credentials.json")
  5. Place it inside the project folder.

Run the script

python main.py

On the first run, your browser will open and ask you to log into Google. A token.json will be generated to store your login session.

Automation

Windows (Task Scheduler)

  1. Open Task Scheduler → "Create Basic Task".
  2. Choose Daily.
  3. Action → "Start a Program".
  4. Program/script:
  • Enter the path of python.exe
"C:\Users\<YOUR NAME>\AppData\Local\Programs\Python\Python313\python.exe"
  1. Arguements:
  • Enter the path of main.py
   "C:\STORAGE\Code\CodeForces2Calendar\main.py"

Security

  • credentials.json and token.json should NOT be shared.
  • Each user must create their own credentials via Google Cloud.
  • This repo includes a .gitignore to keep secrets safe.