Skip to content

Latest commit

 

History

History
64 lines (46 loc) · 1.97 KB

README.md

File metadata and controls

64 lines (46 loc) · 1.97 KB

Erp2gcal

Features

  • Enroll/unenroll batch from cms. Disabled currently as CMS is not functioning.
  • Create google calendar events for the registered courses with ease.

Usage

  1. Download the repo.

  2. Visit and follow the prerequisites.

    Click to read more
    1. Click here and enable the API.
    2. Now go to APIs & Services -> Credentials, Create a project and then Create Credentials -> Oauth client ID -> Desktop app as application type (Make sure you add your BITS email to test users) after creating download it as json.
  3. Have python installed.

  4. Rename the downloaded file as credentials.json and place it along with the downloaded files from step 1.

  5. If you have already have poetry you can skip this step. Else follow along.

    Linux

    python -m venv .venv
    source .venv/bin/activate # Activate the virtual environment
    pip install poetry # Install poetry
  6. Install the dependencies and run the script.

    poetry install
    python main.py -h # To show the help

Examples

Arguments:
  actions      Actions to perform. Refer below for the acceptable values eg: ac (default: abc)

a : Unenrol from all courses
b : Enrol into registered courses on cms
c : Create gcal events
d : Delete created gcal events

  browser      Headless browser of your choice (choose an installed one) (default: firefox)

Acceptable browser params are 'edge', 'firefox', 'chrome'

Options:
  --binary-location=STR   Path to browser's binary

Other actions:
  -h, --help   Show the help
python main.py abc firefox # Refer above for what 'abc' mean
python main.py bc chrome
python main.py --binary-location=/usr/bin/microsoft-edge-dev abc edge