ceasar-cli
v1.0.6
Published
CLI for RS School 1 task
Maintainers
Readme
caesar-cli
RS Node School Task 1
How to use
- install globally
npm install -g ceasar-cli. - Then you run
my_caesar_cliwith the following flags: required:
-aor--action- an action to perform, eitherdecodeorencode. Throws an error otherwise.-sor--shift- a shift by how many numbers to shift the alphabet, positive integers from 1. Throws an error if the flag is omitted.
optional:
-ior--input- a text-file to read an input from. It's better be an existing text-file or an error is thrown. If the flag is omitted, the input is read from the console.-oor--output- a text-file to write an output to. It's better be an existing text-file or an error is thrown. If the flag is omitted, the output is written to the console.
You can also run my_caesar_cli --help to see examples how to yse this CLI:
- my_caesar_cli -a encode -s 7 -i "./input.txt" -o "./output.txt"
- my_caesar_cli --action encode --shift 7 --input plain.txt --output encoded.txt
- my_caesar_cli --action decode --shift 7 --input encoded.txt --output plain.txt
- my_caesar_cli --action encode --shift 7 --output plain.txt
- my_caesar_cli --action decode --shift 7 --input decoded.txt
- my_caesar_cli --action encode --shift 7
- my_caesar_cli --action decode --shift 7