Todo Manager is a command-line application that allows you to manage your tasks. You can add new tasks, list all tasks, delete tasks, and mark tasks as completed.
- Clone the repository:
git clone https://github.com/your-username/todo-manager.git
- Navigate to the project directory:
cd todo-manager
- Set up a virtual environment (optional but recommended):
python -m venv venv
- Activate the virtual environment:
source venv/bin/activate
To use the Todo Manager app, follow the steps below:
Ensure you are in the project directory and have activated the virtual environment (if used).
Run the following command to execute the CLI:
python -m todo_app.cli
add
: Add a new task.list
: List all tasks.delete
: Delete a task.complete
: Mark a task as completed.
The Todo Manager app follows a simple and modular architecture. Here's an overview of the key components:
-
cli.py
: This file contains the command-line interface (CLI) logic using theclick
library. It defines commands such asadd
,list
,delete
, andcomplete
and connects them to the corresponding functions in theutils.py
file. -
models.py
: This file defines theTask
class, representing a single task with properties likedescription
andcompleted
. -
utils.py
: This file contains utility functions for loading and saving tasks. It provides theload_tasks
andsave_tasks
functions, which handle reading tasks from and writing tasks to thetasks.txt
file. -
data/tasks.txt
: This file stores the tasks. Each task is stored as a line in the file, with the format:<description>,<completed>
. Theload_tasks
function reads from this file, and thesave_tasks
function writes to it.
Contributions to the Todo Manager app are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.