Coder Social home page Coder Social logo

todo_app_advanced's Introduction

todo_app_advanced version 1.1.0 ([AT Lab#19])

The application helps to make a todo list with notes.
A note includes title and a body with description of the note.
Every note has created date. Advanced version has some new features that doesn't have before.

Implementation

Dependencies

The application needs to have the following dependencies:

  1. npm --version 6.1.0
  2. node --version 8.11.3

Deploy

$ npm install

Before start the program is supposed to run the command [npm install].
It downloads needed modules and prepars the programm for start.
There is a list of modules and their versions:

  • yargs version ^11.0.0
  • xlsx version 0.13.1
  • excel4node version ^1.3.6

Usage

Available commands:

Advanced usage:

help message with hints about usage the programm

$ node index.js --help

add a new note

$ node index.js add --title 'Title of note' --body 'Body of note'

Command [add] creates new note with title [Title of note] and a body [Body of note].
Also the programm add current(created) date and time as a property date to each note.

remove a note

$ node index.js remove --title 'Title of note'

Command [remove] removes a note with title [Title of note] if it es on the list and write on console about success of operation.
If there isn't a note with title [Title of note] the program write a message on console about that.

read a note

$ node index.js read --title 'Title of note'

Command [read] shows a note with title [Title of note]. In other words show all note with body and created date.

show list of all notes

$ node index.js list

Command [list] shows all notes on console.

clear list of notes

$ node index.js clear

Command [clear] delete all notes. The list becomes empty.

update a note by title

$ node index.js update --title 'Title of a note' --body 'Body of a note'

Command [update] body of existed note with title [Title of a note].
If there isn't a note with title [Title of a note] the programm shows a message on console.

sort list of notes

$ node index.js sort --kind 'note length' --options 'ascending'

Command [sort] allowes to sort all notes by kind of sort with ascending or descending direction of the sort.

kind (requirement)
  • note lenth, title length, title alphabet, date.
options (can omit because default is [descending])
  • ascending, descending.

Advanced usage

write all notes to excel file

$ node index.js writeExcel --file 'Path to result file'

Write excel.xlsx file with all notes from todo_app_advanced list.

read notes from excel file and add them into todo_app's list

$ node index.js readExcel --file 'Path to result file'

Read all notes from excel file and add them into todo_app_advanced list.
If there is a note with the same title in the list, the application ignores it.

Author

Dzmitry_Karneyenka, Republic of Belarus, Minsk

Examples of usage


Command Line Arguments

##Help:
node index.js --help.

##Usage:
index.js --title [string] --body [string]
index.js sort --kind [string] --options [string]
index.js --file [path to file.xlsx]

##Commands:
index.js add add a new note [aliases: a]
index.js list show all notes [aliases: ls]
index.js remove remove a note by title [aliases: rm]
index.js read read a note by title [aliases: r]
index.js clear show all notes [aliases: clr]
index.js sort sort list of notes [aliases: s]
index.js update update an existing note or add new if it doesn't exist before [aliases: u]
index.js readExel Read notes from Exel file [aliases: rex]
index.js writeExel Write notes to Exel file [aliases: wex]

##Options:
--version Show version number [boolean]
-t, --title Title of a note
-b, --body Body of a note
--Path to file
-h, --help Show help [boolean]
--kind, -k kind of sort. Can be [note length, nlength, nl], [title
length, tlength, tl], [title alphabet, tl], [date, d]
--options, -o Options of sort. Valid options: descending or <, ascending or [>]

##Examples: node notes.js add --title 'title add new' --body 'body add new' node notes.js add -t 'title add new' -b 'body add new' node notes.js --title='Title of a note' --body='Body of a note' node index.js sort --kind kind --options ascending node index.js readExel --file ./resources/notes.xlsx node index.js writeExel --file ./resources/notes.xlsx

###Created by Dzmitry Karneyenka

todo_app_advanced's People

Contributors

dkarneyenka avatar karneyenkadzmitry avatar

Watchers

James Cloos 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.