Skip to content

Task manager system to handle various tasks such as creating, updating, deleting, and managing tasks, as well as generating reports and performing searches.

License

Notifications You must be signed in to change notification settings

pgnikolov/task-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task Manager 📑

A simple command-line task manager application written in Python. This project allows users to manage tasks by adding, updating, removing, and filtering tasks based on various criteria.

Features 🧰

  • ➕ Add Task: Add new tasks to the list.
  • ❌ Remove Task: Remove tasks by their ID.
  • 🔄 Update Task: Update task details such as description, priority, and deadline.
  • 🔍 Get Task: Retrieve task details by their ID.
  • 📈 Set Task Priority: Set the priority of a task.
  • ⏰ Set Task Deadline: Set the deadline for a task.
  • ✅ Mark Task as Completed: Mark tasks as completed.
  • 📝 Set Task Description: Set or update the description of a task.
  • 🔎 Search Tasks by Keyword: Search tasks by a keyword in their description.
  • 📌 Filter Tasks by Priority: Filter tasks by their priority.
  • 🚦 Filter Tasks by Status: Filter tasks by their completion status (completed or pending).
  • 📆 Filter Tasks by Deadline: Filter tasks by their deadline.
  • 🔢 Count Tasks: Get the total number of tasks.
  • ☑️ Count Completed Tasks: Get the number of completed tasks.
  • ⏳ Count Pending Tasks: Get the number of pending tasks.
  • 📊 Generate Task Summary: Generate a summary report of all tasks.
  • 💾 Save Tasks: Saves tasks to json file.
  • 📥 Load Tasks: Loads saved tasks from file.
  • ⤵️ Sort Tasks by Deadline: Sort tasks by their deadline.
  • ⤴️ Sort Tasks by Priority: Sort tasks by their priority.
  • 🆔 ID Validation: Ensure the id number is integer.
  • 🔢 Priority Validation: Checks if the priority entered by user is one of "low","medium" or "high".
  • ⏰ Deadline Validation: Checks the date format and if the date is not past.
  • 📝 Description Validation: Checks if the description is not empty string.

Getting Started 💻

Prerequisites

  • Python 3.x

Installation ⚙️

  1. Clone the repository:
git clone https://github.com/yourusername/task-manager.git
cd task-manager

Usage ✍️

Run the main script to start the task manager:

python main.py

Follow the on-screen menu to perform various task management operations.

Modules 📂

Task Module

The task.py module defines the Task class, which represents a task in the task manager. It includes validation methods and conversion methods for task attributes.

TaskManager Module

The task_manager.py module defines the TaskManager class, which manages a list of tasks and provides methods to add, remove, update, filter, sort, and save/load tasks.

Main Script

The main.py script provides a command-line interface for interacting with the TaskManager. It includes a menu for performing various task management operations.

TaskManager 🔄

add_task(task: Task) -> None Adds a new task to the list.

More...
- Parameters:
   - `task (Task)`: The task to be added.

remove_task(task_id: int) -> None: Removes a task by its ID.

More...
  • Parameters:
    • task_id (int): The ID of the task to be removed.

update_task(task_id: int, updated_task: dict) -> None: Updates an existing task.

More...
  • Parameters:
    • task_id (int): The ID of the task to be updated.
    • updated_task (dict): The updated task details.

get_task_by_id(task_id: int) -> Task: Retrieves a task by its ID.

More...
  • Parameters:
    • task_id (int): The ID of the task to be retrieved.

save_tasks_to_file(file_path: str) -> None: Saves the provided list of tasks to a specified file path.

More...
  • Parameters:
    • file_path (str): The path to the file where tasks will be saved.

load_tasks_from_file(file_path: str) -> None: Loads the list of tasks from a specified file path.

More...
- Parameters:
   - `file_path (str)`: The path to the file from which tasks will be loaded.

Task Attribute Operations 🧰

set_task_priority(task_id: int, priority: str) -> None: Sets the priority of a task.

More...
  • Parameters:
    • task_id (int): The ID of the task to be updated.
    • priority (str): The new priority level.

set_task_deadline(task_id: int, deadline: str) -> None: Sets the deadline for a task.

More...
  • Parameters:
    • task_id (int): The ID of the task to be updated.
    • deadline (str): The new deadline.

mark_task_as_completed(task_id: int)-> None: Marks a task as completed.

More...
  • Parameters:
    • task_id (int): The ID of the task to be marked as completed.

set_task_description(task_id: int, description: str) -> None: Sets the description for a task.

More...
  • Parameters:
    • task_id (int): The ID of the task to be updated.
    • description (str): The new description.

Task Filtering and Searching 📑

search_tasks_by_keyword(keyword: str) -> list: Searches tasks by a keyword in the description.

More...
  • Parameters:
    • keyword (str): The keyword to search for.

filter_tasks_by_priority(priority: str) -> list: Filters tasks by priority.

More...
  • Parameters:
    • priority (str): The priority level to filter by.

filter_tasks_by_status(status: str) -> list: Filters tasks by their completion status.

More...
  • Parameters:
    • status (str): The completion status to filter by.

filter_tasks_by_deadline(deadline: str) -> list: Filters tasks by their deadline.

More...
  • Parameters:
    • deadline (str): The deadline to filter by.

Task Counting and Summarizing 🧮

count_tasks() ->: Returns the total number of tasks.

count_completed_tasks() -> int: Returns the number of completed tasks.

count_pending_tasks() -> int: Returns the number of pending tasks.

generate_task_summary() -> dict: Generates a summary report of all tasks.

Task Sorting 📑

sort_tasks_by_deadline() -> None: Sorts tasks by their deadline.

sort_tasks_by_priority()-> None: Sorts tasks by their priority.

Contributing 🤝

Contributions are welcome! Please fork the repository and submit a pull request.

License ©️

This project is licensed under the MIT License. See the LICENSE file for details.

Contact 📫

For any questions or feedback, please contact Gmail

About

Task manager system to handle various tasks such as creating, updating, deleting, and managing tasks, as well as generating reports and performing searches.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages