From 0e62e60c23b069c6053f90b2cbf8eb42a2fbc3e1 Mon Sep 17 00:00:00 2001 From: Shubham Chadokar Date: Wed, 12 Feb 2020 14:17:51 +0530 Subject: [PATCH 1/2] Create Calculator-CLI.md This is a basic calculator cli. Its main feature is adding multiple integers. Use `-f` flag to add the floating-point. Add only even or odd numbers using the `even` or `odd` sub-command. This cli project covers almost all the basic operations required to build a cli. --- Projects/2-Intermediate/Calculator-CLI.md | 33 +++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Projects/2-Intermediate/Calculator-CLI.md diff --git a/Projects/2-Intermediate/Calculator-CLI.md b/Projects/2-Intermediate/Calculator-CLI.md new file mode 100644 index 00000000..82f87445 --- /dev/null +++ b/Projects/2-Intermediate/Calculator-CLI.md @@ -0,0 +1,33 @@ +# Calculator CLI + +**Tier:** 2-Intermediate + +Create a basic calculator with addition feature. + +## User Stories + +- [ ] User can add multiple numbers using `add` command. +- [ ] User can add floating numbers using the `-f` flag. +- [ ] User can add only even/odd numbers using `even`/`odd` sub-command. +- [ ] User can use `--help` or `-h` flag to get all the available commands and flags. + +> Note: The stories 1 and 2 are basically for static typed language, where passed arguments must be of same type. + +## Bonus Features + +- [ ] User can use all the basic arithmetic operations like (addition, subtraction, multiplication and divison). +- [ ] User can use `--help` or `-h` flag to get the sub-commands of command. +- [ ] **Power of** and **Square Root of** operation. + +## Useful links and resources + +- [5 keys to create a killer CLI in Go](https://blog.alexellis.io/5-keys-to-a-killer-go-cli/) +- [How to build a CLI tool in NodeJS ?](https://www.freecodecamp.org/news/how-to-build-a-cli-tool-in-nodejs-bc4f67d898ec/) +- [Build a Command Line Interface (CLI) Application with Node.js](https://codeburst.io/build-a-command-line-interface-cli-application-with-node-js-59becec90e28) +- [Building Beautiful Command Line Interfaces with Python](https://codeburst.io/building-beautiful-command-line-interfaces-with-python-26c7e1bb54df) +- [How to create a CLI in golang with cobra](https://schadokar.dev/posts/how-to-create-a-cli-in-golang-with-cobra/) +- [Building a Network Command Line Interface in Go](https://tutorialedge.net/golang/building-a-cli-in-go/) + +## Example projects + +- [my-calc](https://github.com/schadokar/my-calc) From b61704122f899e94cc9f2a3cf310290da0010ab4 Mon Sep 17 00:00:00 2001 From: Shubham Chadokar Date: Fri, 14 Feb 2020 15:34:46 +0530 Subject: [PATCH 2/2] Update README.md Readme updated with the calculator-cli project in tier-2. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a74fdf2b..bdce4bdf 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ required to complete them. | --------------------------------------------------------------------------------- | -------------------------------------------------- | -------------- | | [Bit Masks](./Projects/2-Intermediate/Bit-Masks-App.md) | Using Bit Masks for Conditions | 2-Intermediate | | [Book Finder App](./Projects/2-Intermediate/Book-Finder-App.md) | Search for books by multiple criteria | 2-Intermediate | +| [Calculator CLI](./Projects/2-Intermediate/Calculator-CLI.md) | Create a basic calculator cli. | 2-Intermediate | | [Card Memory Game](./Projects/2-Intermediate/Card-Memory-Game.md) | Memorize and match hidden images | 2-Intermediate | | [Charity Finder App](./Projects/2-Intermediate/Charity-Finder-App.md) | Find a Global Charity to donate to | 2-Intermediate | | [Chrome Theme Extension](./Projects/2-Intermediate/Chrome-Theme-Extension.md) | Build your own chrome theme extention. | 2-Intermediate |