{"id":27255879,"url":"https://github.com/mayokun-sofowora/task-tracker-cpp","last_synced_at":"2025-04-11T02:48:32.700Z","repository":{"id":287068961,"uuid":"963489211","full_name":"Mayokun-Sofowora/Task-Tracker-cpp","owner":"Mayokun-Sofowora","description":"A CLI app that tracks your tasks and manages your to-do list. A roadmap cpp project.","archived":false,"fork":false,"pushed_at":"2025-04-09T19:54:31.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T20:28:27.398Z","etag":null,"topics":["cpp","cpp20"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mayokun-Sofowora.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-09T18:58:30.000Z","updated_at":"2025-04-09T19:57:09.000Z","dependencies_parsed_at":"2025-04-09T20:29:56.627Z","dependency_job_id":"00fb123b-ccae-4a63-ba93-bf45837b132b","html_url":"https://github.com/Mayokun-Sofowora/Task-Tracker-cpp","commit_stats":null,"previous_names":["mayokun-sofowora/task-tracker-cpp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayokun-Sofowora%2FTask-Tracker-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayokun-Sofowora%2FTask-Tracker-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayokun-Sofowora%2FTask-Tracker-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mayokun-Sofowora%2FTask-Tracker-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mayokun-Sofowora","download_url":"https://codeload.github.com/Mayokun-Sofowora/Task-Tracker-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248332483,"owners_count":21086078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","cpp20"],"created_at":"2025-04-11T02:48:29.092Z","updated_at":"2025-04-11T02:48:32.687Z","avatar_url":"https://github.com/Mayokun-Sofowora.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C++ Task Tracker CLI\n\nTask Tracker is a simple command-line interface (CLI) application built entirely in C++ (using C++20 standards) to help you manage your tasks. It allows you to add new tasks, update existing ones, mark their progress (todo, in-progress, done), delete tasks, and list them based on their status.\n\nThis project serves as a practical exercise in C++ programming, covering:\n*   Command-line argument parsing (`argc`, `argv`)\n*   File I/O using standard C++ libraries (`\u003cfstream\u003e`)\n*   Basic manual JSON parsing and serialization (without external libraries)\n*   Object-Oriented Programming principles (using a `Task` class)\n*   Working with standard containers (`std::vector`) and algorithms (`\u003calgorithm\u003e`)\n*   Date and time handling (`\u003cchrono\u003e`)\n\n## Features\n\n*   **Add Tasks:** Add new tasks with a description.\n*   **Update Tasks:** Modify the description of an existing task.\n*   **Delete Tasks:** Remove tasks by their unique ID.\n*   **Track Status:** Mark tasks as `todo`, `in-progress`, or `done`.\n*   **List Tasks:**\n    *   List all tasks.\n    *   List tasks filtered by status (`todo`, `in-progress`, `done`).\n*   **Data Persistence:** Tasks are saved to a `tasks.json` file in the current directory.\n*   **No Dependencies:** Uses only standard C++ libraries.\n\n## Prerequisites\n\n*   A C++ compiler supporting C++11 or later (e.g., g++, Clang).\n*   A command-line terminal or shell (Linux, macOS, Windows with MinGW/WSL/Developer Command Prompt).\n\n## Building the Application\n\n**To Compile the program:** Open your terminal, navigate to the directory containing `task-cli.cpp`, and run the command:\n\n   ```bash\n    g++ task-cli.cpp -o task-cli -std=c++20\n   ```    \nIf successful, you will find an executable file named `task-cli` (or `task-cli.exe`) in the same directory.\n\n## Usage\n\nRun the application from your terminal using the compiled executable (`./task-cli` on Linux/macOS, `task-cli.exe` or `.\\task-cli.exe` on Windows).\n\n**Command Line Syntax:**\n\n```bash\n./task-cli \u003ccommand\u003e [arguments...]\n```\n\n### Available Commands\n\n*   `add \u003c\"description\"\u003e`\n    *   Adds a new task with the given description.\n    *   **Important:** Enclose the description in double quotes (`\"`) if it contains spaces.\n    *   *Example:* `./task-cli add \"Buy groceries and cook dinner\"`\n\n*   `update \u003cid\u003e \u003c\"description\"\u003e`\n    *   Updates the description of the task with the specified `\u003cid\u003e`.\n    *   **Important:** Enclose the new description in double quotes (`\"`) if it contains spaces.\n    *   *Example:* `./task-cli update 1 \"Buy groceries only\"`\n\n*   `delete \u003cid\u003e`\n    *   Deletes the task with the specified `\u003cid\u003e`.\n    *   *Example:* `./task-cli delete 3`\n\n*   `mark-in-progress \u003cid\u003e`\n    *   Marks the task with the specified `\u003cid\u003e` as 'in-progress'.\n    *   *Example:* `./task-cli mark-in-progress 2`\n\n*   `mark-done \u003cid\u003e`\n    *   Marks the task with the specified `\u003cid\u003e` as 'done'.\n    *   *Example:* `./task-cli mark-done 1`\n\n*   `mark-todo \u003cid\u003e`\n    *   Marks the task with the specified `\u003cid\u003e` as 'todo'.\n    *   *Example:* `./task-cli mark-todo 2`\n\n*   `list [filter]`\n    *   Lists tasks.\n    *   If no `[filter]` is provided or `all` is used, lists all tasks.\n    *   Optional `[filter]` can be one of: `todo`, `in-progress`, `done`.\n    *   *Examples:*\n        *   `./task-cli list` (Lists all tasks)\n        *   `./task-cli list done` (Lists only completed tasks)\n        *   `./task-cli list todo` (Lists only tasks yet to be started)\n\n*   `help` or `--help`\n    *   Displays the usage instructions and available commands.\n    *   *Example:* `./task-cli help`\n\n### Data Storage\n\n*   Tasks are stored in a JSON file named `tasks.json`.\n*   This file is created automatically in the **same directory where you run the `task-cli` executable** if it doesn't already exist.\n*   The file contains a JSON array of task objects, each having `id`, `description`, `status`, `createdAt`, and `updatedAt` fields.\n\n### Limitations\n\n*   **Basic JSON Handling:** The JSON parsing and serialization are implemented manually without external libraries. This makes the handling less robust than using a dedicated library. It may fail if the `tasks.json` file is manually edited incorrectly or contains complex escaped characters not handled by the basic escaping/unescaping logic.\n*   **Error Handling:** Basic error handling is implemented, but more complex edge cases might not be covered.\n*   **Concurrency:** This application is not designed for simultaneous use by multiple processes or users modifying the same `tasks.json` file.\n\n### Project Page URL\n\n*  Project hosted at: [https://roadmap.sh/projects/task-tracker](https://roadmap.sh/projects/task-tracker)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayokun-sofowora%2Ftask-tracker-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmayokun-sofowora%2Ftask-tracker-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmayokun-sofowora%2Ftask-tracker-cpp/lists"}