A user-friendly desktop application to track daily work times, calculate deduction points based on lateness and undertime, and maintain a history of records for easy management.
-
ποΈ Date Selection
- Easily select a date using dropdown menus for year, month, and day.
- Automatically displays the selected day of the week.
-
β° Time Entry
- Record Morning and Afternoon in/out times with AM/PM selection.
- Utilize a built-in time picker for accurate time selection.
- Validate time inputs with real-time feedback.
-
π― Accurate Calculations
- Detect lateness and undertime based on predefined schedules.
- Calculate deduction points and display work durations.
- Support for half-day absences.
- Flexi Time Out logic to adjust supposed time out based on actual time in.
-
πΎ Save Records
- Store daily deductions in a structured JSON format.
- Prevent duplicate records for the same date with user confirmation.
-
π History Management
- View all saved records in a detailed and sortable table.
- Multi-selection for batch deletion.
- Single-record editing with automatic recalculations.
- Search records within a specified date range.
-
π Export to CSV
- Export history for external analysis or backups.
-
π Theme Switching
- Choose between Light Mode and Dark Mode for better accessibility.
- Automatic adjustment of text and background colors based on the selected theme.
-
π₯οΈ Full-Screen Mode
- Work in a distraction-free, full-screen environment.
-
π Help & Documentation
- Access detailed instructions on using the application via a built-in Help menu.
-
π Data Integrity
- Robust error handling and input validation to ensure data accuracy.
- Logging of application activities for troubleshooting and audit purposes.
-
Clone the Repository
git clone https://github.com/KCprsnlcc/DTR-Calculator.git
-
Navigate to the Project Directory
cd DTR-Calculator -
Set Up a Python Virtual Environment (Optional but Recommended)
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install Dependencies
pip install -r requirements.txt
-
Run the Application
python main.py
Run the application using the command:
python main.pyThe application window will open and center itself on your screen.
- Use the dropdown menus at the top to select the Year, Month, and Day.
- The selected day of the week will be displayed automatically.
-
Morning Section:
- Check "Include Morning" if you worked in the morning.
- Enter Actual Time In using the fields or the "Select Time" button.
-
Afternoon Section:
- Check "Include Afternoon" if you worked in the afternoon.
- Enter Actual Time Out using the fields or the "Select Time" button.
Click "Calculate Deductions" to:
- View lateness, undertime, and work durations.
- See total deduction points for the day.
Click "Save Record" to store the calculated deductions. Records are saved in a JSON file (dtr_records.json) for later access.
- Review past records in the Deduction History table.
- Edit Record: Right-click on a record and select "Edit Record" to modify actual times. The application will automatically recalculate deductions.
- Delete Record(s): Select one or multiple records and press the "Delete" key or right-click and choose "Delete Record".
Export all records to a CSV file using the "Export History" button for external analysis or backups.
- Switch between Light Mode and Dark Mode using the respective buttons at the top.
- The application will adjust colors for optimal readability based on the selected theme.
Click "Full Screen" to expand the application to full screen for a distraction-free workspace. Click again to toggle back to windowed mode.
Navigate to the Help menu to access:
- How to Use: Detailed instructions on using the application.
- About: Information about the application, contributors, and contact details.
DTR-Calculator/
β
βββ build/ # Build outputs
β βββ DTR Calculator # Application build folder
β
βββ dist/ # Distribution folder
β βββ DTR Calculator # Application distribution folder
β
βββ .gitignore # Git ignore file
βββ DTR Calculator.spec # PyInstaller spec file
βββ README.md # Documentation
βββ dtr_app.log # Application log
βββ dtr_records.json # Saved records
βββ icon.ico # Application icon
βββ main.py # Main application file
βββ requirements.txt # Python dependencies
This project requires the following Python packages:
ttkbootstrap: For modern GUI design.tkinter: Python's standard GUI toolkit (usually included with Python).pandas: For CSV export functionality.json: For saving records.datetime: For handling date and time operations.logging: For application logging.calendar: For date-related functionalities.
Install all dependencies with:
pip install -r requirements.txtttkbootstrap
pandas
Note: tkinter, json, datetime, logging, and calendar are part of Python's standard library and do not need to be installed separately.
We welcome contributions! Here's how you can help:
-
Fork the Repository Click the "Fork" button on the top-right corner of this page.
-
Clone Your Fork
git clone https://github.com/KCprsnlcc/DTR-Calculator.git
-
Create a Branch
git checkout -b feature/YourFeatureName
-
Make Changes Improve the application or fix bugs.
-
Test Your Changes Ensure everything works as expected.
-
Commit Your Changes
git commit -m "Add your commit message here" -
Push Your Branch
git push origin feature/YourFeatureName
-
Open a Pull Request Navigate to the original repository and submit your pull request.
This project is licensed under the License. See the LICENSE file for details.
- Python Community for the amazing resources and support.
- ttkbootstrap contributors for enhancing Tkinter's aesthetics.
- Contributors for their efforts in improving the application.
For any questions or support, please contact:
Khadaffe Abubakar Sulaiman
Email: [email protected]
GitHub: KCprsnlcc
-
Application Fails to Launch
- Ensure all dependencies are installed correctly.
- Check if Python is added to your system's PATH.
-
Cannot Save Records
- Verify that the application has write permissions to the directory.
- Ensure that
dtr_records.jsonis not open in another program.
-
Theme Not Changing
- Restart the application to apply theme changes.
- Ensure that the selected theme is supported.
For further assistance, please open an issue on the GitHub repository.
Thank you for using the Daily Time Record (DTR) Calculator! We hope it helps you manage your time.