-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
executable file
·21 lines (21 loc) · 834 Bytes
/
main.py
File metadata and controls
executable file
·21 lines (21 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import autofill
import slack.slackbot as slackbot
from datetime import date
today = date.today().strftime("%m-%d")
try:
autofill.autofill(300, info=True, label=True, image=True, size=5)
except Exception as e:
# catch ALL exceptions and send them to the slack bot channel--generally bad practice but useful here.
slackbot.send_message(f"Error in autofill: {e}", channel="G093HPVQ9AP")
raise e
# try:
# if today in ["05-01", "11-01"]:
# with open("peroxide_formers/last_check", "r") as f:
# last_check = f.read()
# if last_check != today:
# check_all_classes()
# with open("peroxide_formers/last_check", "w") as f:
# f.write(today)
# except Exception as e:
# slackbot.send_message(f"Error in check_peroxides: {e}", channel="C07SSMMU9E1")
# raise e