From 894cff575dff051494dc7e2971a001ebed3fd5a9 Mon Sep 17 00:00:00 2001 From: Anastas1aCodes Date: Mon, 21 Nov 2022 09:32:59 +0800 Subject: [PATCH] Main Algorithm --- README.md | 4 ++++ main.py | 27 +++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 main.py diff --git a/README.md b/README.md index 899fda2..1af3c1f 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # Zoom-Scheduler Automatically opens Zoom Meetings for you so you don't have to. +# Requirements: +# Video > 'Turn off my video when joining meeting' +# Optional: Audio > 'Automatically join audio by computer when joining a meeting' +# Optional: Audio > 'Mute my microphone when joining a meeting' \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..e8749a3 --- /dev/null +++ b/main.py @@ -0,0 +1,27 @@ +###SETTINGS### +ZOOM_URL = "https://nyp-sg.zoom.us/j/88526538027?pwd=V1UvY1Y3elRwRUhtSXZIQ1hrOHZBdz09" +ZOOM_TIME = '09:01:00' #HH:MM:SS format +ZOOM_DAY = 'Monday' + +###CODE (DON'T TOUCH IF YOU DONT KNOW WHAT YOU ARE DOING!)### +import schedule,time,webbrowser,sys +def openMeeting(): + webbrowser.open(ZOOM_URL) + sys.exit('Successfully opened Zoom Meeting!') +try: + match ZOOM_DAY.lower(): + case 'monday'|'mon':schedule.every().monday.at(ZOOM_TIME).do(openMeeting) + case 'tuesday'|'tues':schedule.every().tuesday.at(ZOOM_TIME).do(openMeeting) + case 'wednesday'|'wed':schedule.every().wednesday.at(ZOOM_TIME).do(openMeeting) + case 'thursday'|'thurs':schedule.every().thursday.at(ZOOM_TIME).do(openMeeting) + case 'friday'|'friday':schedule.every().friday.at(ZOOM_TIME).do(openMeeting) + case 'saturday'|'sat':schedule.every().saturday.at(ZOOM_TIME).do(openMeeting) + case 'sunday'|'sun':schedule.every().sunday.at(ZOOM_TIME).do(openMeeting) + case _:raise TypeError('Enter a correct day!') +except schedule.ScheduleValueError:exit +while 1: + schedule.run_pending() + if time.strftime("%H:%M:%S")==ZOOM_TIME:raise NameError('Error opening Zoom Meeting') + elif len(ZOOM_TIME)!=8:raise TypeError('Input time in HH:MM:SS format!') + time.sleep(1) + print(f'﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏﹏\n︴Current Time: {time.strftime("%H:%M:%S")} ︴\n︴Meeting Time: {ZOOM_TIME} ︴\n﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋﹋')