Task-manager-CLI with Priority Modification

Overview

Task-manager-CLI with Priority Modification

The functions for the app have been written in task.py file.

1. Install Node.js

This project requires Node.js and npm to be implemented.

2. Create Create symbolic link to the executable file

On Windows

To create a symbolic link on Windows, you'll need to run the following command in either the Windows Command Prompt, or Windows Powershell with administrator privileges.

Command Prompt:

> mklink task task.bat

Powershell:

> cmd /c mklink task task.bat

Specification

  1. The app can be run in the console with ./task.

  2. The app reads from and writes to task.txt for pending tasks along with its priority.

  3. It reads from and writes to completed.txt for completed tasks which includes the task name only.

  4. Priority can be any integer greater than or equal to 1. 1 being the highest priority

  5. If two task have the same priority, the task that was added first should be displayed first.

  6. The files will always be sorted in order of the priority, ie, the task with the highest priority will be first item in the file.

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.

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

$ .\task add 5"the thing i need to do"
Added task: "the thing i need to do" with priority 5

The task is added to the task.txt file in the following format.

p task

where p is the priority and task is the task description. The lower the number, the higher the priority.

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.

The task is added to the completed.txt in the following format. It is also removed from task.txt

task

where task is the task description.

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.

$ .\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

Run Automated Tests

The Jest module has been used to create test cases for the command line application. Run the following command to use the test file

$ npm test

You might also like...
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.
Python-Stock-Info-CLI: Get stock info through CLI by passing stock ticker.

Python-Stock-Info-CLI Get stock info through CLI by passing stock ticker. Installation Use the following command to install the required modules at on

A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool
A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool

Privateer A simple CLI based any Download Tool, that find files and let you stream or download thorugh WebTorrent CLI or Aria or any command tool How

Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python
Yts-cli-streamer - A CLI movie streaming client which works on yts.mx API written in python

YTSP It is a CLI movie streaming client which works on yts.mx API written in pyt

[WIP]An ani-cli like cli tool for movies and webseries

mov-cli A cli to browse and watch movies. Installation This project is a work in progress. However, you can try it out python git clone https://github

:computer: tmux session manager. built on libtmux

tmuxp, tmux session manager. built on libtmux. We need help! tmuxp is a trusted session manager for tmux. If you could lend your time to helping answe

cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored in many CMSIS PACKs

cmsis-pack-manager cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored i

A minimalist Vim plugin manager.
A minimalist Vim plugin manager.

A minimalist Vim plugin manager. Pros. Easy to set up: Single file. No boilerplate code required. Easy to use: Concise, intuitive syntax Super-fast pa

TUIFIManager - A cross-platform terminal-based file manager
TUIFIManager - A cross-platform terminal-based file manager

TUIFI Manager A cross-platform terminal-based file manager (and component), mean

Owner
null
Simple CLI interface for linear task manager

Linear CLI (Unmaintained) Simple CLI interface for linear task manager Usage Install: pip install linearcli Setup: Generate a pe

Mike Lyons 1 Jan 7, 2022
A CLI Spigot plugin manager that adheres to Unix conventions and Python best practices.

Spud A cross-platform, Spigot plugin manager that adheres to the Unix philosophy and Python best practices. Some focuses of the project are: Easy and

Tommy Dougiamas 9 Dec 2, 2022
Python CLI vm manager for remote access of docker images via noVNC

vmman is a tool to quickly boot and view docker-based VMs running on a linux server through noVNC without ssh tunneling on another network.

UCSD Engineers for Exploration 1 Nov 29, 2021
Dart Version Manager CLI implemented with Python and Typer.

Dart Version Manager CLI implemented with Python and Typer.

EducUp 6 Jun 26, 2022
A CLI Password Manager made using Python and Postgresql database.

ManageMyPasswords (CLI Edition) A CLI Password Manager made using Python and Postgresql database. Quick Start Guide First Clone The Project git clone

Imira Randeniya 1 Sep 11, 2022
Password manager for the CLI simps.

CLI Password Manager Password manager for the CLI simps. Free software: MIT license

null 1 Dec 30, 2021
Notion-cli-list-manager - A simple command-line tool for managing Notion databases

A simple command-line tool for managing Notion List databases. ✨

Giacomo Salici 75 Dec 4, 2022
Sink is a CLI tool that allows users to synchronize their local folders to their Google Drives. It is similar to the Git CLI and allows fast and reliable syncs with the drive.

Sink is a CLI synchronisation tool that enables a user to synchronise local system files and folders with their Google Drives. It follows a git C

Yash Thakre 16 May 29, 2022
flora-dev-cli (fd-cli) is command line interface software to interact with flora blockchain.

Install git clone https://github.com/Flora-Network/fd-cli.git cd fd-cli python3 -m venv venv source venv/bin/activate pip install -e . --extra-index-u

null 14 Sep 11, 2022
AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

AWS Interactive CLI - Allows you to execute a complex AWS commands by chaining one or more other AWS CLI dependency

Rafael Torres 2 Dec 10, 2021