Giter Club home page Giter Club logo

join-ashoka-class's Introduction

Join-Ashoka-Class

Have a class at the devilish time of 8:30 AM? Perhaps a late lunch means your class at 2:50 PM is a bit of a pain-in-the-ass? Or simply, is going to online classes just not your thing? There is something that could help.

Youtube link for project video

Working Explained

A combination of CRONTAB and python scripts allows you to automatically join your class at Ashoka University (duh, you got to be enrolled at the Univeristy!).

  • The CRONTAB script executes the following function:

    1. run the python script every day-of-week from Monday through Friday at 8:26 AM, 10:06 AM, 11:46 AM, 2:46 PM, 4:26 PM and 6:06 PM (i.e. 4 minutes before every class slot).
  • The python script executes the following functions:

    1. log in to AMS through your Google account
    2. open the timetable and select the class slot which begins in the next 5 minutes that day of the week
    3. alert the user if no class is scheduled and exits the program, or, open the gmeet or zoom link of the upcoming class
    4. close the camera and mic (you don't wanna not do this :p) and join the meeting

Setup

  1. In main.py, change the location of the chromedriver as per your requirements:
driver = webdriver.Chrome(service=Service("<location-of-chromedriver>"), options=chrome_options)
  1. Make a file named config.py in the same directory as main.py. This file would contain your Google account's credentials, in the following format:
username = '<ashoka-email-id>'
password = '<ashoka-email-password>'
  1. Configure Zoom settings (required specifically for Zoom classes)
  • Go to Options and enable 'Open at Login'
  • In the Zoom app, go to Settings > Video and check ( ☑  ) Stop my video when joining a meeting
  • In the Zoom app, go to Settings > Audio and check ( ☑  ) Automatically join computer audio when joinnig a meeting
  • In the Zoom app, go to Settings > Audio and check ( ☑  ) Mute my mic when joining meeting
  1. Schedule your computer to wake up automatically atleast 12-15 minutes before the beginning of every class slot. Instructions for this can be found here: MAC and WINDOWS
  2. Make a Crontab file (for MAC) which contains the following text:
PYTHONPATH=<location-of-modules-imported-in-main.py>
26 8,16 * * 1-5 <location-of-python3> <location-of-main.py> > <location-of-log-file-1-which-will-be-created> 2>&1
6 10,18 * * 1-5 <location-of-python3> <location-of-main.py> > <location-of-log-file-2-which-will-be-created> 2>&1
46 11,14 * * 1-5 <location-of-python3> <location-of-main.py> > <location-of-log-file-3-which-will-be-created> 2>&1

This is what this looked like for me:

PYTHONPATH=/Users/satyakinkohli/PycharmProjects/Join-AshokaClass/venv/lib/python3.9/site-packages
26 8,16 * * 1-5 /usr/bin/python3 /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/main.py > /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/log1.txt 2>&1
6 10,18 * * 1-5 /usr/bin/python3 /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/main.py > /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/log2.txt 2>&1
46 11,14 * * 1-5 /usr/bin/python3 /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/main.py > /Users/satyakinkohli/PycharmProjects/Join-AshokaClass/log3.txt 2>&1

More details on how to write Cron schedule expressions can be found here.

join-ashoka-class's People

Contributors

satyakinkohli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.