Skip to content

ShobanChiddarth/open_online_class_link

Repository files navigation

Open Online Class Link

CTech_ZoomMeetingBlog

Simple script that opens your online class meeting link based on your timetable and the current time. Works for any recurring meeting schedule - college, school, or job.

No need to check the timetable, hunt for the link, or figure out which period it is. Just set today's day order and run the script.

Pre-requisites

  1. Python 3
  2. pyperclip (only needed for copy_link.py) - install with pip install pyperclip

Setup

There are 4 files you need to configure.

1. subjects.txt

List all your subjects line by line in all caps. This file is for your own reference only - the program does not use it.

CHEMISTRY
PHYSICS
ENGLISH
MATH
CS

2. links.ini

Copy links-sample.ini to a new file named links.ini and fill in your actual meeting links.

[Subjects]
CHEMISTRY=https://meet.example.com/chemistry
PHYSICS=https://meet.example.com/physics
ENGLISH=https://meet.example.com/english
MATH=https://meet.example.com/math
CS=https://meet.example.com/cs

3. timetable.txt

A pipe-delimited table. The first row defines time slots, the remaining rows are your day orders.

|     Time|8,45 -  9,45|9,45  - 10,45|10,45 - 11,15|
|DayOrder |            |             |             |
|1        |MATH        |PHYSICS      |noclass      |
|2        |ENGLISH     |MATH         |noclass      |

A few rules:

  • Time format: Use 24-hour format as a tuple - 8,45 means 8:45, 13,0 means 13:00. Never start an hour with 0 (use 9,0 not 09,0).
  • Time ranges: Write as 8,45 - 9,45. Spaces around the - are fine.
  • Subjects: Use all caps, matching exactly what you put in links.ini.
  • Breaks: Use noclass for any break or free period.
  • Pipe separators: Every row must start and end with |. Do not add or remove pipes without adjusting every other row.
  • Line 2 is a blank separator row - leave it as is, just add/remove | columns to match.

The number of day orders is up to you - add or remove rows as needed.

4. dayorder.txt

Create a file named dayorder.txt in the same directory. Each morning, open it and set today's day order - just a single number corresponding to a row in your timetable.

3

To mark a holiday or a day with no classes, put:

noclass

If dayorder.txt is missing or has an invalid value, the script will prompt you to enter the day order at runtime.

Usage

To open the link in your default browser:

python3 open_default.py

To copy the link to your clipboard:

python3 copy_link.py

Both scripts print the current day order, time, subject name, and the link before acting on it.

If there is no class at the current time (outside all defined slots, break period, or dayorder.txt set to noclass), the script prints Break time / No class right now.

To look up a meeting link by subject name:

python3 print_subject_link.py <subject>

Example:

$ python3 print_subject_link.py MLT
https://meet.google.com/xxx-xxxx-xxx

$ python3 print_subject_link.py XYZ
No link found for subject: XYZ

The subject name is case-insensitive. Reads from the same links.ini as the other scripts.

Daily Workflow

  1. Check what day order your college has assigned for today.
  2. Open dayorder.txt, update the number, save.
  3. Run open_default.py or copy_link.py whenever you need to join a class.

About

Script to open link of online class

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages