Author: Samuel Hezekiah Epodoi - C2 BSE
VIDEOWALKTHROUGH: I have placed this in the comments section of my canvas submission
A simple script that automatically creates the complete project structure for the Student Attendance Tracker.
- Make the script executable:
chmod +x setup_project.sh- Run it:
./setup_project.sh- Follow the prompts:
- Enter a name for your project.
- Choose whether to update warning/failure thresholds. If you say yes, enter new percentage values. If you press Enter without typing values, default thresholds are used.
After running, you will have a folder named attendance_tracker_<yourname> containing:
attendance_checker.py— the main Python programHelpers/folder withassets.csvandconfig.jsonreports/folder with an emptyreports.log
If you press Ctrl+C while the setup script is running, the script will:
a) Create a backup archive of everything created so far named attendance_tracker_<yourname>_archive (tar.gz)
b) Delete the incomplete project folder to keep the workspace clean
c) Exit cleanly
- Run
./setup_project.sh. - Enter a project name.
- While files are being created, press Ctrl+C.
You should see an archive file named like attendance_tracker_yourname_archive.tar.gz that contains the partial project.
The script checks if Python 3 is installed by running python3 --version.
- If Python 3 is found, the script prints the version (for example: "Python 3.10.4 installed").
- If Python 3 is missing, it warns you that Python 3 is not installed.
This script implements the project factory required for the Individual Summative Lab. It creates the required directory structure, optionally updates thresholds in config.json, and handles SIGINT (Ctrl+C) by archiving and cleaning up.