A student lateness logger system for schools, written in Python
Using Adam Geitgey's face_recognition library, LateLogger can extract people from a web camera
LateLogger detects the current class and starts itself with the current configuration of students for accurate lateness detection. After a class has ended, LateLogger logs the students' lateness.
LateLogger offers command-line tools for managing the class schedule, classes and students.
The following commands are available:
python setup
: Set up the config filepython class_schedule <view|edit>
: Manage class schedulepython create_class <classname>
: Create a new classpython edit_class <classname>
: Edit an existing classpython delete_class <classname>
: Delete a classpython load_image <filename> <name> <class>
: Load a student from an image filepython webcam_test
: Test the webcam's configurationpython main.py [lessonid]
: Start LateLogger (additionally with a given lesson)
- Python 3.10+
- macOS or Linux (Face recognition might not work on Windows)
face_recognition
validators
python packageevents
python package- Access to a MySQL server
Install Python 3.10+ on your system
If you already have Python installed, verify the version by running
python --version
NOTE: If you have multiple versions of Python installed, you may need to use python3
instead of python
in bash shells
Download this repository with
git clone https://github.com/Enecske/LateLogger
Then, install the required packages by running
pip install -r requirements.txt
Or, you can install them individually
pip install face_recongition
pip install validators
pip install events
Set up LateLogger by running
python setup
Answer the questions in the prompt, and you're ready to go!
After LateLogger is set up, run it with
python main.py
This will start LateLogger with the default settings (no set time or class)
Time configuration is available by running
python main.py <weekday> <shifthour> <shiftminute>
weekday
is the day of the week (Monday is 1, Tuesday is 2 etc.)shifthour
is a value between -23 and 23 that the hour should be shifted withshiftminute
is a value between -59 and 59 that the minute should be shifted with
Launching LateLogger is also available with a single lesson, using
python main.py <lessonid>
lessonid
is the id of the lesson
LateLogger provides user-friendly command line tools for managing students and classes
The class schedule contains all the data necessary for LateLogger to know what class is currently
Managing the class schedule can be done with the following command:
python class_schedule <view|edit>
If you specified edit in the command, an additional terminal will appear:
│ Mon │ Tue │ Wed │ Thu │ Fri │
──┼───────┼───────┼───────┼───────┼───────┤
1 │9 9c│ │ │ │ │
2 │1 8a│ │ │ │ │
3 │2 9c│ │ │ │ │
4 │3 10b│ │ │ │ │
5 │ │ │ │ │ │
6 │4 9a│ │ │ │ │
7 │5 9b│ │6 9c│ │10 12a│
>
Example output
help
: Show the commandsshow
: Display the class scheduleadd <day> <hour> <class>
: Add a lesson in a given timemodify <day> <hour> <class>
: Modify the lesson in a given timedelete <day> <hour>
: Delete a lesson in a given timeexit
;q
: Exit the class schedule editor