https://github.com/mohammed-majid/task-manager
To-do list web app that organizes data using a heap data structure
https://github.com/mohammed-majid/task-manager
data-structures graph heap
Last synced: 6 months ago
JSON representation
To-do list web app that organizes data using a heap data structure
- Host: GitHub
- URL: https://github.com/mohammed-majid/task-manager
- Owner: Mohammed-Majid
- Created: 2023-06-10T07:27:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-28T20:42:59.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T05:08:30.607Z (about 1 year ago)
- Topics: data-structures, graph, heap
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flask To-Do List Application
This is a simple Flask web application that allows users to add tasks with due dates and prioritize them based on how soon they are due.
## Features
- Add tasks with due dates
- Automatically prioritize tasks based on the closest due date
- View the prioritized list of tasks
- Reset the task list
## Requirements
- Python 3.x
- Flask
## Setup and Installation
1. **Clone the repository:**
```
git clone https://github.com/Mohammed-Majid/Task-Manager.git
```
2. **Create a virtual environment:**
```
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
```
3. **Install the dependencies:**
```
pip install Flask
```
4. **Run the application:**
```
python app.py
```
5. **Open your browser and go to:**
```
http://127.0.0.1:5000
```
## Usage
1. Open the application in your browser.
2. Add tasks:
- Enter the task name and due date (in dd/mm format) in the form and submit.
3. View the prioritized list of tasks:
- The tasks will be displayed in the order of their due dates, from soonest to latest.
4. Reset the task list:
- Click the "Reset" button to clear all tasks.
## Project Structure
- `app.py`: The main Flask application file.
- `templates/index.html`: The HTML template for rendering the task form and displaying the prioritized list.
- `static/css/styles.css`: The CSS file for styling the HTML template.
## Extra info
- This project uses an adj list with a graph that initially has one node "A".
- Each time a task is added, a weighted edge connected to a neighbor is added.
- weights represent the number of days left while nodes represent the tasks.
- A min heap is used to sort through the weights of the graph to order them in a priority list.