The Weekly Routine Manager is a sleek and intuitive desktop application designed to help you manage and organize your weekly routines. Built with Python and the PySide6
library, this app offers a user-friendly interface for creating, viewing, editing, deleting, importing, and exporting your daily schedules. Whether you're a fan of dark mode or prefer a light theme, this app provides an easy toggle between the two, ensuring a comfortable user experience.
- ποΈ View Routine: Select a day of the week to view all scheduled activities for that day.
- β Add New Routine: Easily add new time and activity entries for any specific day.
- βοΈ Edit Routine: Modify existing time and activity details of a routine.
- β Delete Routine: Remove specific entries from a dayβs routine.
- π₯ Import Routine: Import routine data from an XML file.
- π€ Export Routine: Export routine data to an XML file.
- π Toggle Dark/Light Mode: Switch between dark and light themes with a simple click.
- πͺ Exit: Quit the application with a single click.
Before you can run the application, ensure that you have the following installed:
- π Python 3.x: The application is built using Python 3.x.
- π₯οΈ PySide6: This is the primary framework used for the graphical user interface.
You can install the required Python packages by running:
pip install PySide6 qtpy
To start the application, navigate to the project directory and execute the following command:
git clone https://github.com/mdriyadkhan585/Weekly-Routine-Manager
cd Weekly-Routine-Manager
python main.py
This will launch the Weekly Routine Manager application.
The application interface is organized into several sections for ease of use:
- πͺ Exit Button (X): Positioned at the top left, this button closes the application.
- π Dark/Light Mode Toggle (M): Located at the top right, this button toggles between dark and light modes. Long-pressing the button displays a tooltip: "Check Dark/White Mode".
- π Day Selector: A dropdown menu that allows you to select a day of the week to view the routine.
- π Show Routine Button: Displays the activities scheduled for the selected day.
- π Routine Table: A table with two columns:
- β° Time: Displays the time of each activity.
- π Activity: Displays the description of each activity.
- β Add New Routine: Opens a dialog to add a new routine entry with time and activity. This entry is then added to the table and the database.
- β Delete Routine: Opens a dialog to input the row number of the entry you want to delete. The entry is removed from the table and the database.
- βοΈ Edit Routine: Opens a dialog to edit the time and activity of a selected row. The edited entry is updated in the table and the database.
- π₯ Import: Allows you to import routine data from an XML file, replacing the current data.
- π€ Export: Exports the current routine data to an XML file, which is saved in the
Documents
folder.
- Select a Day: Use the dropdown menu to select a day.
- Show Routine: Click the "Show Routine" button to display the schedule for the selected day.
- Add New Routine: Click the "Add New Routine" button.
- Input Details: In the dialog box, enter the time and activity details.
- Save or Cancel: Click "OK" to add the entry, or "Cancel" to discard it.
# Example of adding a new routine entry
time = "10:00 AM - 11:00 AM"
activity = "π§ Meditation"
add_routine(time, activity)
- Edit Routine: Click the "Edit Routine" button.
- Select Row: Enter the row number you wish to edit.
- Modify Details: Update the time and activity.
- Save or Cancel: Click "OK" to save changes, or "Cancel" to discard them.
# Example of editing an existing routine entry
row = 2 # Row number to edit
new_time = "11:00 AM - 12:00 PM"
new_activity = "π Study Time"
edit_routine(row, new_time, new_activity)
- Delete Routine: Click the "Delete Routine" button.
- Select Row: Enter the row number of the entry you wish to delete.
- Confirm or Cancel: Click "OK" to delete, or "Cancel" to keep the entry.
# Example of deleting a routine entry
row_to_delete = 3 # Row number to delete
delete_routine(row_to_delete)
- Export: Click the "Export" button.
- Choose Location: Select a location in the
Documents
folder to save the XML file.
- Import: Click the "Import" button.
- Select XML File: Choose the XML file to import. The current routine data will be replaced by the data in the file.
# Example of importing routine data from XML
import_routine("routine_data.xml")
- Toggle Mode: Click the "M" button in the top right corner to switch between dark and light modes.
- Tooltip: Long-pressing the "M" button displays a tooltip saying "Check Dark/White Mode".
- Exit: Click the "X" button in the top left corner to close the application.
The application uses an SQLite database (routine.db
) to store routine data. The database has a routine
table with the following structure:
- day: The day of the week (e.g., "Monday").
- time: The time slot of the activity.
- activity: The description of the activity.
When you add, edit, or delete routines in the app, the database is automatically updated.
CREATE TABLE routine (
id INTEGER PRIMARY KEY,
day TEXT NOT NULL,
time TEXT NOT NULL,
activity TEXT NOT NULL
);
-- Insert a new routine
INSERT INTO routine (day, time, activity)
VALUES ('Monday', '08:00 AM - 09:00 AM', 'ποΈββοΈ Gym');
-- Update a routine
UPDATE routine
SET time = '09:00 AM - 10:00 AM', activity = 'β Coffee Break'
WHERE id = 1;
-- Delete a routine
DELETE FROM routine WHERE id = 1;
You can further customize the look and feel of the application by modifying the style sheets in the apply_theme()
method within the routine_view.py
file. The method defines styling for both dark and light modes.
def apply_theme(dark_mode=True):
if dark_mode:
# Set dark theme styles
self.setStyleSheet("background-color: #2E2E2E; color: white;")
else:
# Set light theme styles
self.setStyleSheet("background-color: white; color: black;")
To ensure everything runs smoothly, make sure you have the following installed:
pip install PySide6 qtpy
- App crashes on startup: Ensure all dependencies are installed correctly.
- Database not updating: Check for correct SQL syntax when adding, editing, or deleting entries.
- Dark/Light mode not toggling: Verify that the
apply_theme()
method is properly configured.
We welcome contributions! If you encounter bugs, feel free to submit an issue or a pull request.
This project is licensed under the MIT License. See the LICENSE
file for more details.
For any queries or support, feel free to reach out to the project maintainers.