A command-line tool written in Go for managing tasks. This tool allows you to add, view, edit, delete, filter, and check overdue tasks. Additionally, it provides functionality to sync tasks with a server and save them to a local file.
- Add a New Task: Create a new task with title, priority, due date, category, description, and tags.
- View All Tasks: Display a list of all tasks with their details.
- Edit a Task: Modify existing tasks' details.
- Delete a Task: Remove a task from the list.
- Filter Tasks: Filter tasks by priority, due date, or keyword.
- Check Overdue Tasks: View tasks that are overdue.
- Sync with Server: Synchronize tasks with a remote server.
- Save Tasks: Save tasks to a local JSON file.
- Load Tasks: Load tasks from a local JSON file.
-
Clone the repository:
git clone https://github.com/Dem0n4ik/task-manager.git cd task-manager
-
Initialize Go modules:
go mod init task-manager
-
Build the application:
go build -o task_manager
-
Run the application:
./task_manager
-
You will see a menu with available commands:
Commands: 1. ADD - Add a new task 2. VIEW - View all tasks 3. EDIT - Edit a task 4. DELETE - Delete a task 5. FILTER - Filter tasks 6. OVERDUE - Check overdue tasks 7. SYNC - Sync tasks with server 8. SAVE - Save tasks 9. EXIT - Exit the program
-
Enter the number corresponding to the desired command and follow the prompts.
Commands:
1. ADD - Add a new task
2. VIEW - View all tasks
3. EDIT - Edit a task
4. DELETE - Delete a task
5. FILTER - Filter tasks
6. OVERDUE - Check overdue tasks
7. SYNC - Sync tasks with server
8. SAVE - Save tasks
9. EXIT - Exit the program
Enter command number: 1
Adding a new task
Task title: Buy groceries
Priority: High
Due date (format yyyy-mm-dd): 2024-08-01
Category: Personal
Task description: Buy milk, eggs, and bread
Tags (comma separated): shopping,urgent
Task added successfully.
-
Go 1.16+: Make sure Go is installed on your machine. You can download it from golang.org.
-
net/http: Used for synchronizing tasks with a remote server.
- Server URL: In the
syncTasksWithServer
function, replace theurl
variable with your server's URL.
- Data File: The tasks are stored in a file named
tasks.json
. This file will be created in the same directory as the executable.
This project is licensed under the MIT License. See the LICENSE file for details.