This Task Manager CLI allows you to manage tasks through a command-line interface. You can create, view, edit, delete, and filter tasks with ease.
Creates a new task.
Usage:
addtask
You will be prompted to input task details such as title, description, category, priority, etc.
Displays a list of tasks filtered by optional criteria.
Usage:
tasks [--category CATEGORY] [--status STATUS] [--keywords KEYWORDS] [--priority PRIORITY]Filters:
--category- Filter tasks by category.--status- Filter tasks by status.--keywords- Filter tasks containing specific keywords in their title or description.--priority- Filter tasks by priority.
Example:
tasks --category Work --status CompletedMarks a task as completed.
Usage:
done <task_id>Example:
done 1Deletes a task.
Usage:
del <task_id>Example:
del 1Edits an existing task by updating specified attributes.
Usage:
edittask <task_id> [attribute=value ...]Attributes:
title- Update the title of the task.description- Update the task's description.category- Update the task's category.priority- Update the task's priority.status- Update the task's status.
Example:
edittask 1 title="New Title" priority="High"Deletes all tasks from the task list.
Usage:
clearThe tasks command will output tasks in a tabular format. For example:
tasks --priority HighEach task includes the following attributes:
id(str): A unique identifier for the task.title(str): The name of the task.description(str): A detailed description of the task.category(str): The category the task belongs to.due_date(str): The deadline for the task in the formatdd Month yyyy.priority(str): The priority level of the task (Low,Medium,High).status(str): The current status of the task (Not done,In progress,Completed).
Output:
+--------+-------------------+------------+---------------------+----------+-----------+----+
| Title | Description | Category | Date | Priority | Status | ID |
+--------+-------------------+------------+---------------------+----------+-----------+----+
| Task 1 | Example Task | Work | 2024-12-08 10:00 | High | In Progress | 1 |
+--------+-------------------+------------+---------------------+----------+-----------+----+
The CLI handles errors gracefully:
- If required arguments are missing, it will prompt you for proper usage.
- Invalid attributes for
edittaskwill raise an error with the invalid attribute name.
Example Error:
Invalid attribute: due_date- Python Libraries:
tabulate(for rendering tables in the terminal)find_task,task,task_io(custom modules for task operations)
- Ensure proper setup of the
Taskclass and related modules.
- Tasks are saved automatically after modifications using the
save_taskfunction. - Task data is loaded dynamically from storage using
load_tasks.
- Add support for recurring tasks.
- Include task reminders and notifications.