diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-07-04 23:53:23 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2019-07-04 23:53:23 -0400 |
commit | 071192f159f22b7d2cbd318f78456593835420db (patch) | |
tree | 423b73671a5047701ab61f8c4788a4b6b898c5b9 /source | |
parent | a956211b2cd0ba7d970f08afe3b7470728691206 (diff) | |
download | jdtalk-071192f159f22b7d2cbd318f78456593835420db.tar.gz |
Add output modifiers:
1) Random case
2) Hill case
3) 1337speek
Diffstat (limited to 'source')
-rw-r--r-- | source/app.d | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/app.d b/source/app.d index d5b89ad..387d19d 100644 --- a/source/app.d +++ b/source/app.d @@ -21,6 +21,9 @@ int main(string[] args) long i = 0, limit = 0; bool exactMatch = false; + bool rCase = false; + bool hCase = false; + bool haxor = false; string pattern = null; string dataRoot = absolutePath(getcwd()); @@ -33,6 +36,9 @@ int main(string[] args) "limit|c", format("(default: %d)", limit), &limit, "pattern|p", "Limit output to a root word", &pattern, "exact|e", format("Exact matches only (default: %s)", exactMatch ? "true" : "false"), &exactMatch, + "rcase", format("Randomize case (default: %s)", rCase ? "true" : "false"), &rCase, + "hcase", format("Change every other case (default: %s)", hCase ? "true" : "false"), &hCase, + "leet", format("1337ify output (default: %s)", haxor ? "true" : "false"), &haxor, "dataroot|d", "Path to dictionaries", &dataRoot, ); @@ -66,6 +72,16 @@ int main(string[] args) } } + if (rCase) { + output = randomCase(output); + } + else if (hCase) { + output = hillCase(output); + } + else if (haxor) { + output = leetSpeak(output); + } + writeln(output); if (limit > 0) { |