Here is the Demo of CLI Application.
-
Check if python is installed,
python3 --version
-
If Python is installed, you should be able to run cli application by following command:
-
On Windows:
.\task.bat
-
On *nix:
./task.sh
-
-
Else install python and run above command again.
>> npm install
>> pip install -r requirements.txt
Run Windows Command Prompt or Windows Powershell with administrator privileges.
Command Prompt:
>> mklink task task.bat
Powershell:
>> cmd /c mklink task task.bat
Run the following command in your shell:
>> ln -s task.sh task
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
Use the ls command to see all the items that are not yet complete, in ascending order of priority.
[index] [task] [priority]
Example:
>> ./task ls
1. change light bulb [2]
2. water the plants [5]
Use the add command. The text of the task should be enclosed within double quotes.
>> ./task add 5 "the thing i need to do"
Added task: "the thing i need to do" with priority 5
Use the del command to remove an item by its index.
>> ./task del 3
Deleted item with index 3
Use the done command to mark an item as completed by its index.
>> ./task done 1
Marked item as done.
Use *report command to view the number of complete and incomplete items in the list.
>> ./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