Python CLI Task Manager Project
Python CLI Task Manager Project
The user-friendliness of the CLI is ensured by providing clear instructions and a simple menu interface that allows users to easily input commands and execute functions without confusion. This enhances the overall user experience .
The essential components include creating a new directory for the project, such as 'task_manager', and inside this directory, a Python file named 'task_manager.py' should be created .
Functions to handle adding a task, viewing all tasks with their completion status, deleting a task by ID, and marking a task as complete need to be implemented. Additionally, file handling functions to save tasks to a file named 'tasks.json' and load tasks from this file when the application starts are also required .
Functionality should be evaluated based on whether the application works as intended with all specified features, including adding, viewing, deleting, and completing tasks, as well as correctly saving and loading tasks to/from a file .
Marking tasks as complete is important because it allows users to update the status of their tasks, reflecting progress towards their goals. This function enhances usability by providing a visual indicator of task status, aiding users in managing and organizing their responsibilities more effectively .
Clear code commenting contributes to quality assessment by helping maintain clean, well-structured code that is easy to understand and manage. It ensures that other developers can quickly grasp the function and purpose of different code segments within the application .
The README.md file should include the project title and description, instructions on how to run the application (e.g., using 'python task_manager.py'), and an overview of the functionalities implemented in the application .
A simple loop should be used to create a CLI that displays a menu with options to add, view, delete, complete tasks, and exit the application. The application should use input from the user to execute the corresponding functions .
The task structure can be defined by creating a simple Task class with attributes including an integer 'id' for the task ID, a string 'title' for the task title, and a boolean 'completed' indicating if the task is completed .
The task data is retained by saving the list of tasks to a file named 'tasks.json'. This JSON format allows tasks to be loaded when the application starts, ensuring data persistence .