A command-line application in Python that efficiently manages user authentication, task tracking, and administrative functions. It streamlines task management, allowing members of a small business to effortlessly view, manage, and assign tasks internally.
Python
The dataset used for this project is stored in user.txt and tasks.txt files, containing user credentials for the admin and task details, respectively.
task-manager/
│
├── data/
│ └── user.txt
│ └── tasks.txt
│
├── task_manager.py
│
└── README.md
- Data Collection:
The project reads user credentials and task information from text files. The user credentials are stored in 'user.txt', and tasks are stored in 'tasks.txt'. The data for this task manager project is primarily driven by user input.
-
User Authentication:
- Reading User Credentials: User credentials are read from the 'user.txt' file and stored in a dictionary user_credentials. The user.txt file contains lines of usernames and passwords separated by commas.
- Login Section: Users are prompted to enter their username and password. Two while loops are used to validate the entered credentials against the stored credentials. If the entered username or password is incorrect, the user is prompted to retry until the correct credentials are entered. A success message is displayed upon successful login.
-
Main Menu and User Options:
- Register a User ('r'): Users can register a new user by providing a new username and password. Password confirmation is required to ensure accuracy. New user credentials are appended to the 'user.txt' file upon successful registration.
- Add Task ('a'): Users can assign a task to any user by providing the username, task title, description, due date, and the date assigned. The new task is appended to the 'tasks.txt' file with a status of "No".
- View All Tasks ('va'): All tasks from 'tasks.txt' are read and displayed. Task information such as assigned user, title, description, due date, assigned date, and status is printed for each task.
- View My Tasks ('vm'): Tasks assigned to the logged-in user are displayed. Task information such as title, description, due date, assigned date, and status is printed for each relevant task.
- Exit ('e'): The program exits with a goodbye message.
-
Error Handling and Validation:
- Input Validation: The menu options are validated to ensure the user enters a valid option. If an invalid input is entered, an error message is displayed, and the user is prompted to try again.
- Password Confirmation: When registering a new user, the entered password must be confirmed by re-entering it to avoid mistakes.
- Task Information Handling: The task information is split and formatted to be more readable when displaying tasks.
-
User Input Dependency:
The functionality and data management within this project heavily depend on the user's input. Users are responsible for entering valid usernames, passwords, task details, and selecting appropriate menu options to ensure proper operation and data integrity.
- Clone the repository:
git clone https://github.com/ellahu1003/task-manager.git cd task-manager
- Run the application:
python task_manager.py
The project does not require any additional packages beyond Python standard libraries.
- User Authentication: Secure login for users.
- Task Management: Add, view, and manage tasks.
- Administrative Functions: Register new users and assign tasks.
- Main Menu Options:
r - Register a new user.
a - Add a new task.
va - View all tasks.
vm - View my tasks.
e - Exit the application.
This Task Manager project provides a simple yet effective solution for managing tasks and user authentication within a small business environment. It allows users to easily assign and track tasks, ensuring efficient workflow and task management.