hero-image
HOME
hero-image
project-highlight-image

ASMC Office Login Device

hero-image
Jaycee Dylan Alipio

Project Timeline

Aug 2023 - Nov-2023

OVERVIEW

Office login device which lets student government leaders clock in. Utilizes a graphical user interface along with Python to display a program for student leaders to navigate. Lets student leaders clock in by inputting their ID which lets program search through a database in order to clock them in. I made this project when I was in community college to help track my student government leaders for attendance.

SKILLS

PythonGUIRaspberry PIRaspberri PI OS

Additional Details

GUI.jpg

Above is the GUI for users to input their username and then a prompt for password

Raspberry PI OS

Used raspberry pi to host program

Raspberry Pi.jpg

Backend Code

import datetime, os, sys
from functions.clockFunctions import *
from functions.fileFunctions import *
from functions.GUI import *

# Change path if files are moved
main_directory = os.path.dirname(__file__)
ID_path = main_directory + "/ID.txt"
logs_path = main_directory + "/logs"
current_datetime = datetime.datetime.now()
formatted_date = current_datetime.strftime("%m-%d-%Y")

def main():
    root.geometry("250x150+300+300")
    root.resizable(False, False)
    id_name_title_pairs = fileOpen()
     
    def on_login(id_input):
        if not id_name_title_pairs:
            return

        search_id = int(app.text_widget_value())
        app.text_widget.delete("1.0", tk.END)
        
        if search_id == -1:
            print("Exiting the program.")
            sys.exit()
        
        for user in id_name_title_pairs:
            if user["ID"] == search_id:
                user["Time"] = datetime.datetime.now().strftime("%H:%M:%S")
                status = idFound(user, user["Name"], user["Role"])
                app.clockWindow(user["Name"], user["Role"], user["ID"], status, formatted_date)
                
                new_status = update_status(status)
                print(f"Status: {status}")
                created_file_path = fileCreate(logs_path, user["ID"], user["Name"])
                
                if new_status == "In":
                    print(f"Clock In Time: {user['Time']}")
                    fileWrite(created_file_path, user["Name"], user["Time"], new_status)
                    
                if new_status == "Out":
                    print(f"Clock Out Time: {user['Time']}")
                    print(f"Total Time: {clockTime(created_file_path, user['Time'])}")
                    fileWrite(created_file_path, user["Name"], user["Time"], new_status)
                found = True
        

    def update_status(new_status):
        print(f"Updated status in main.py: {new_status}")
        return new_status
        
    app = Window(on_login, update_status)
    root.mainloop()
    
if __name__ == "__main__":
    main()
lowinertia
Portfolio Builder for Engineers
Created by Aram Lee
© 2025 Low Inertia. All rights reserved.