Code Monkey home page Code Monkey logo

my_caesar_cli's Introduction

Caesar CLI

CLI tool for node.js that will encode and decode a text by Caesar cipher. RS School task.

App layout

my_caesar_cli
│
├─ caesar-modules
│  ├─ codec.js
│  └─ files-io.js
├─ caesar.js
├─ decode-test.txt
└─ encode-test.txt

Entry:
./caesar.js

About this App

  • if passed params are fine the output (file or stdout) should contain encoded/decoded content of input (file or stdin).
  • if the input file is missed - App use stdin as an input source.
  • if the output file is missed - App use stdout as an output destination.
  • if the input and/or output file is given but doesn't exist or can't read it (e.g. because of permissions or it is a directory) - you'll get the error message.
  • This app use only the English alphabet

For start

Clone or download this repository for use CLI App on your computer.

For installation modules:
npm i

For start use:
$ node caeser.js --shift <shift: is number> --action <action: encode || decode> [--input <string: file name || STDIO>] [--output <string: file name || STDOUT>]

Options:

  • -s, --shift: a shift (requered option)
  • -i, --input: an input file (requered option)
  • -o, --output: an output file
  • -a, --action: an action encode/decode

Demo

Use:
$ node caesar.js -s 7 -a encode --input encode-test.txt

Your shift is 7 and you choice action is encode
encode-test.txt
Aopz pz zljyla. Tlzzhnl hivba "_" zftivs!

$ node caesar.js -s 7 -a decode --input decode-test.txt

Your shift is 7 and you choice action is decode
decode-test.txt
This is secret. Message about "_" symbol!

Gratitude

Thank you for attention
Grazie per l'attenzione.

Contacts

Ilya Lokalin (@ILokalin) in Discorde
or LI#4947
https://t.me/IlyaLokalin in Telegram

my_caesar_cli's People

Contributors

ilokalin avatar

Watchers

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