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.
- Python 3
pyperclip(only needed forcopy_link.py) - install withpip install pyperclip
There are 4 files you need to configure.
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
CSCopy 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/csA 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,45means 8:45,13,0means 13:00. Never start an hour with0(use9,0not09,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
noclassfor 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.
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.
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.
- Check what day order your college has assigned for today.
- Open
dayorder.txt, update the number, save. - Run
open_default.pyorcopy_link.pywhenever you need to join a class.
