Code Monkey home page Code Monkey logo

to-do-app's Introduction

To-Do App

This is a command line-based to-do app that allows you to add, remove, edit, and view tasks.

Installation

Clone this repository and run npm install to install the dependencies. Ensure you have Node.js installed. After installing the dependencies, npm will automatically compile the code. You can then run the following command to allow the app to be run from anywhere using the todo keyword:

npm link to-do-app

Usage

To use the app, run todo along with one of these commands:

  • add|a --name <task name> [--dueDate <due date>] [--description <description>] [--tags <"tag1 tag2 ...">"] [--effort <1-6>] [--importance <1-6>] - Adds a task with the specified parameters.
    • The due date can be in any of the formats below:
      • YYYY-MM-DD (e.g., 2024-06-05)
      • Month DD YYYY (e.g., June 5 2024)
      • DD Month YYYY (e.g., 5 June 2024)
      • For more info, check the MDN docs
    • The effort and importance parameters are a measure (from 1 to 6) of how important a task is, as well as how much effort is needed to complete the task. These values are used to calculate a priority score, which increases as the due date comes closer. It is calculated using the following expression: $\dfrac{2b}{\sqrt[a]{ d }}$, where $b$ is the importance, $a$ effort, and $d$ days until the deadline. If you want to see a graph of priority score over time, check this Desmos graph
  • complete|delete|c|d --id <task ID>
    • Removes the task with the specified ID.
  • list|l [--tag <tag>]
    • Lists all tasks. If a tag is provided, will only show the tasks with that tag.
  • view|v --id <task ID>
    • Displays the info of the task with the specified ID.
  • edit|e --id <task ID>
    • Prompts the user to edit each parameter of the task with the specified ID.

Note: The following flag shorthands are available: --name: -n --dueDate: -d --description: -m --tags: -t --effort: -e --importance: -i --id: -k

For example:

  • todo a -n "buy groceries" -d 2024-06-05 -m "buy milk and bread" -t "tag1 tag2" will create a task named "buy groceries" for June 5th, 2024 with the description "buy milk and bread" with the tags "tag1" and "tag2".
  • todo a -n work -d "July 2 2024" -e 5 -i 6 will create a task named "work" for July 2nd, 2024 with an effort of 5 and importance of 6.
  • todo l -t tag1 will show a table with all the tasks that have the tag "tag1".
  • todo v -k 1 will show the info of the task with id 1.
  • todo complete -id 23 will remove the task with id 23.

Note: If the task name or due date includes spaces, enclose them in quotes to ensure correct command execution. Additionally, when running a command without specifying all parameters, you will be prompted in the console to input the missing information like so:

> todo a

? name: buy groceries
? dueDate: 2025-06-05
? description: buy milk and bread
? tags: tag1 tag2
? effort: 3
? importance: 4
Task created:
buy groceries #3
buy milk and bread
Thu, 05 Jun 2025
[tag1, tag2]
3:4 - 1

Contributing

Contributions to the app are welcome! Feel free to fix bugs, add features, or report any issues by opening an issue on GitHub. I am a high-school student and I am trying to learn how to make things like this, and I'd appreciate some help.

Roadmap

The roadmap for this project is located in the ROADMAP.md file. Feel free to add your ideas and suggestions there.

Made with ๐Ÿ’• by Araz

to-do-app's People

Contributors

arazestprit avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.