forked from carolinedunn/facial_recognition
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
33 lines (24 loc) · 762 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
from facial_req import facial_req
from send_email import send_email
import datetime
complete_names = ['Alice', 'Bob', 'Charlotte', 'David', 'Elliot', 'Fiona']
start_time = ['9:00', '10:15', '11:30', '12:45', '13:30', '14:40']
currentDT = datetime.datetime.now()
while True:
currentDT = datetime.datetime.now()
time = str(currentDT.hour) + ':' + str(currentDT.minute)
if time in start_time:
present_names = facial_req()
type = 'Present'
send_email(present_names, type)
tardy_names = facial_req()
type = 'Tardy'
send_email(tardy_names,type)
absent_names = []
for name in complete_names:
if name in present_names or name in tardy_names:
pass
else:
absent_names.append(name)
type = 'Absent'
send_email(absent_names)