{"id":25186012,"url":"https://github.com/chiraag-kakar/todo-cli","last_synced_at":"2025-04-04T08:44:22.629Z","repository":{"id":186795127,"uuid":"322839983","full_name":"chiraag-kakar/todo-cli","owner":"chiraag-kakar","description":null,"archived":false,"fork":false,"pushed_at":"2020-12-19T12:14:35.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T19:43:25.533Z","etag":null,"topics":["todo-cli"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chiraag-kakar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-12-19T12:12:45.000Z","updated_at":"2023-01-22T15:52:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"70cb410f-3c6b-4c9c-9402-b60857111379","html_url":"https://github.com/chiraag-kakar/todo-cli","commit_stats":null,"previous_names":["chiraag-kakar/todo-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiraag-kakar%2Ftodo-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiraag-kakar%2Ftodo-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiraag-kakar%2Ftodo-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chiraag-kakar%2Ftodo-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chiraag-kakar","download_url":"https://codeload.github.com/chiraag-kakar/todo-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149464,"owners_count":20891949,"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":["todo-cli"],"created_at":"2025-02-09T19:41:20.496Z","updated_at":"2025-04-04T08:44:22.607Z","avatar_url":"https://github.com/chiraag-kakar.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CoronaSafe Engineering Fellowship Test Problem\n\nThanks for applying to the CoronaSafe Engineering fellowship!\n\nIn this step we want to see how you implement a command-line (CLI) program that lets you manage your todos.\n\nThe specification for this problem is written down as tests. Since we haven’t actually implemented anything, the tests are currently failing. You have to solve the problem by implementing the application and getting all the tests to pass.\n\nHere's how it should work when you're done:\n\n[![Todo-CLI](https://res.cloudinary.com/sv-co/image/upload/v1607935139/fullstack-CEF/Todo-CLI/play-video-demo_fp50wp.png)](https://vimeo.com/490621534)\n## Getting started\n\n1. Install Node.js: You need to have npm installed in your computer for this problem. It comes with Node.js and you can get it by installing Node from https://nodejs.org/en/\n\n2. You are expected to write the code in `todo.js` file.\n\n3. Once you are done with the changes you should be able to execute the todo app by running the following command from the terminal.\n\n   **On Windows:**\n\n   ```\n   .\\todo.bat\n   ```\n\n   **On \\*nix:**\n\n   ```\n   ./todo.sh\n   ```\n## Run Automated Tests\n\n### 1. Install Node.js\n\nYou need to have npm installed in your computer for this problem. It comes with Node.js and you can get it by installing Node from https://nodejs.org/en/\n\n### 2. Install dependencies\n\nRun `npm install` to install all dependencies.\n\n### 3. Create Create symbolic link to the executable file\n\n#### On Windows\n\nTo create a symbolic link on Windows, you'll need to run either the Windows Command Prompt, or Windows Powershell **with administrator privileges**. To do so, right-click on the icon for Command Prompt, or Powershell, and choose the _\"Run as Administrator\"_ option.\n\n**Command Prompt:**\n\n```\n\u003e mklink todo todo.bat\n```\n\n**Powershell:**\n\n```\n\u003e cmd /c mklink todo todo.bat\n```\n\n#### On \\*nix:\n\nRun the following command in your shell:\n\n```\n$ ln -s todo.sh todo\n```\n\n### 4. Try running tests.\n\nNow run `npm test` and you will see all the tests failing. As you fill in each functionality, you can re-run the tests to see them passing one by one.\n\n## A Note about `/` for Windows Users\n\nIn the following sections, you'll see many commands prefixed with `./`, or paths containing the `/` (forward-slash) character.\n\nIf you're using the Windows _Command Prompt_, then you'll need to replace `/` with `\\` (back-slash) for these commands and paths to work as expected.\n\nOn Windows _Powershell_, these substitutions are not required.\n\n## Specification\n\n1. The app can be run in the console with `./todo`.\n\n2. The app should read from and write to a `todo.txt` text file. Each todo item occupies a single line in this file. Here is an example file that has 2 todo items.\n\n```txt\nwater the plants\nchange light bulb\n```\n\n3.  When a todo item is completed, it should be removed from `todo.txt` and instead added to the `done.txt` text file. This file has a different format:\n\n    ```txt\n    x 2020-06-12 the text contents of the todo item\n    ```\n\n    1. the letter x\n    2. the current date in `yyyy-mm-dd` format\n    3. the original text\n\n    The date when the todo is marked as completed is recorded in the `yyyy-mm-dd` format (ISO 8601). For example, a date like `15th August, 2020` is represented as `2020-08-15`.\n\n4.  The application must open the files `todo.txt` and `done.txt` from where the app is run, and not where the app is located. For example, if we invoke the app like this:\n\n    ```\n    $ cd /path/to/plans\n    $ /path/to/apps/todo ls\n    ```\n\n    The application should look for the text files in `/path/to/plans`, since that is the user’s current directory.\n\n## Usage\n\n### 1. Help\n\nExecuting the command without any arguments, or with a single argument `help` prints the CLI usage.\n\n```\n$ ./todo help\nUsage :-\n$ ./todo add \"todo item\"  # Add a new todo\n$ ./todo ls               # Show remaining todos\n$ ./todo del NUMBER       # Delete a todo\n$ ./todo done NUMBER      # Complete a todo\n$ ./todo help             # Show usage\n$ ./todo report           # Statistics\n```\n\n### 2. List all pending todos\n\nUse the `ls` command to see all the todos that are not yet complete. The most recently added todo should be displayed first.\n\n```\n$ ./todo ls\n[2] change light bulb\n[1] water the plants\n```\n\n### 3. Add a new todo\n\nUse the `add` command. The text of the todo item should be enclosed within double quotes (otherwise only the first word is considered as the todo text, and the remaining words are treated as different arguments).\n\n```\n$ ./todo add \"the thing i need to do\"\nAdded todo: \"the thing i need to do\"\n```\n\n### 4. Delete a todo item\n\nUse the `del` command to remove a todo item by its number.\n\n```\n$ ./todo del 3\nDeleted todo #3\n```\n\nAttempting to delete a non-existent todo item should display an error message.\n\n```\n$ ./todo del 5\nError: todo #5 does not exist. Nothing deleted.\n```\n\n### 5. Mark a todo item as completed\n\nUse the `done` command to mark a todo item as completed by its number.\n\n```\n$ ./todo done 1\nMarked todo #1 as done.\n```\n\nAttempting to mark a non-existed todo item as completed will display an error message.\n\n```\n$ ./todo done 5\nError: todo #5 does not exist.\n```\n\n### 6. Generate a report\n\nUse the `report` command to see the latest tally of pending and completed todos.\n\n```\n$ ./todo report\nyyyy-mm-dd Pending : 1 Completed : 4\n```\n\n## Improving README.md\n\nIf you feel like we are missing out steps, feel free to make a pull request. [Github Repo](https://github.com/nseadlc-2020/package-todo-cli-task)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiraag-kakar%2Ftodo-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchiraag-kakar%2Ftodo-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchiraag-kakar%2Ftodo-cli/lists"}