parent
ac2cf2ac58
commit
a44fc24bee
@ -0,0 +1,33 @@
|
|||||||
|
(ns cipher-analytical-machine.cli.options
|
||||||
|
(:require
|
||||||
|
[cipher-analytical-machine.symbols.factories :as sf]
|
||||||
|
[clojure.string :as cs])
|
||||||
|
(:gen-class))
|
||||||
|
|
||||||
|
(def cipher-options
|
||||||
|
#{"Caesar"})
|
||||||
|
|
||||||
|
(def default-cipher "Caesar")
|
||||||
|
|
||||||
|
(def language-options
|
||||||
|
#{"en", "uk"})
|
||||||
|
|
||||||
|
(def default-symbols
|
||||||
|
(sf/default-symbol-factory "en"))
|
||||||
|
|
||||||
|
(def cli-options
|
||||||
|
[["-m" "--message MESSAGE" "The message will be encrypted or decrypted."]
|
||||||
|
["-M" "--message-file MESSAGE-FILE" "The file contains the message that will be encrypted or decrypted."]
|
||||||
|
["-k" "--key KEY" "The key will be used to encrypt or decrypt."]
|
||||||
|
["-c" "--cipher CIPHER" "The cipher will be used to encrypt or decrypt a message."
|
||||||
|
:default default-cipher]
|
||||||
|
["-e" "--encrypt" "Encrypt the message."]
|
||||||
|
["-d" "--decrypt" "Decrypt the message."]
|
||||||
|
["-s" "--symbols SYMBOLS" "The string will be used as a set of symbols for a cipher."
|
||||||
|
:default default-symbols]
|
||||||
|
["-l" "--language CODE" "The string will be used to set a default symbols for a cipher."
|
||||||
|
:validate [#(contains? language-options %) "Must be a code from the list: en, uk!!!"]]
|
||||||
|
["-C" "--cracking" "Cracking the encrypted message."]
|
||||||
|
["-O" "--output-file OUTPUT-FILE" "Save the program output to a file."]
|
||||||
|
["-h" "--help"]])
|
||||||
|
|
Loading…
Reference in new issue