Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aryamanz29/todo-cli-v2
Todo-CLI-V2 : A Simple CLI written in python π
https://github.com/aryamanz29/todo-cli-v2
cli python todo todo-cli
Last synced: 21 days ago
JSON representation
Todo-CLI-V2 : A Simple CLI written in python π
- Host: GitHub
- URL: https://github.com/aryamanz29/todo-cli-v2
- Owner: Aryamanz29
- License: mit
- Created: 2021-12-08T17:38:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T07:01:24.000Z (almost 2 years ago)
- Last Synced: 2024-11-22T19:11:23.931Z (3 months ago)
- Topics: cli, python, todo, todo-cli
- Language: JavaScript
- Homepage: https://github.com/Aryamanz29/Todo-CLI-V2
- Size: 299 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
β‘TODO CLI (V2)β‘
[![Todo-CLI](https://res.cloudinary.com/sv-co/image/upload/v1638058186/GDC/SE/Admission/gdc-home-page_b6s3go.png)](https://vimeo.com/648902045)
## Getting started π
1. Install Python: Python is usually installed by default on most modern systems. To check what your currently have, open a terminal and run the following command:
```
python3 --version
```This should output some information on the installed Python version.
You can also install python by following these instructions: https://installpython3.com/2. You are expected to write the code in `task.py` file.
3. Once you are done with the changes you should be able to execute the task app by running the following command from the terminal.
**On Windows:**
```
.\task.bat
```**On \*nix:**
```
./task.sh
```
## Run Automated Tests π₯### 1. 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/
### 2. Install dependencies
Run `npm install` to install all dependencies.
### 3. Try running tests.
Now 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.
## Usage π
### 1. Help
Executing the command without any arguments, or with a single argument help prints the CLI usage.
```
$ ./task help
Usage :-
$ ./task add 2 hello world # Add a new item with priority 2 and text "hello world" to the list
$ ./task ls # Show incomplete priority list items sorted by priority in ascending order
$ ./task del INDEX # Delete the incomplete item with the given index
$ ./task done INDEX # Mark the incomplete item with the given index as complete
$ ./task help # Show usage
$ ./task report # Statistics
```### 2. List all pending items
Use the ls command to see all the items that are not yet complete, in ascending order of priority.
Every item should be printed on a new line. with the following format
```
[index] [task] [priority]
```Example:
```
$ ./task ls
1. change light bulb [2]
2. water the plants [5]
```index starts from 1, this is used to identify a particular task to complete or delete it.
### 3. Add a new item
Use the add command. The text of the task should be enclosed within double quotes (otherwise only the first word is considered as the item text, and the remaining words are treated as different arguments).
```
$ ./task add 5 "the thing i need to do"
Added task: "the thing i need to do" with priority 5
```### 4. Delete an item
Use the del command to remove an item by its index.
```
$ ./task del 3
Deleted item with index 3
```Attempting to delete a non-existent item should display an error message.
```
$ ./task del 5
Error: item with index 5 does not exist. Nothing deleted.
```### 5. Mark a task as completed
Use the done command to mark an item as completed by its index.
```
$ ./task done 1
Marked item as done.
```Attempting to mark a non-existed item as completed will display an error message.
```
$ ./task done 5
Error: no incomplete item with index 5 exists.
```### 6. Generate a report
Show the number of complete and incomplete items in the list. and the complete and incomplete items grouped together.
```
$ ./task report
Pending : 2
1. this is a pending task [1]
2. this is a pending task with priority [4]Completed : 3
1. completed task
2. another completed task
3. yet another completed task
```
## Feel Free To Contribute β