diff --git a/Passwordy/README.md b/Passwordy/README.md new file mode 100644 index 0000000..0321dd6 --- /dev/null +++ b/Passwordy/README.md @@ -0,0 +1,31 @@ +Passwordy +====== + +Generate randomized strings, useful for generating passwords and such. + + --------------------------------------------------------------- + |Generates a randomized password. | + | | + |> passwordy [length] ["p"] ["d"] | + | | + | length : How many characters. Default 032. | + | p : If present, the password will contain punctuation | + | characters. Otherwise not. | + | d : If present, the password will contain digits. | + | Otherwise not. | + | | + | The password can always contain upper and lowercase | + | letters. | + --------------------------------------------------------------- + --------------------------------------------------------------- + |Generates a randomized sentence | + | | + |> passwordy sent [length] [join] | + | | + | length : How many words to retrieve. Default 005. | + | join : The character that will join the words together. | + | Default space. | + --------------------------------------------------------------- + + +To use the `sentence` function, you can download [this dictionary](https://github.com/voussoir/else/tree/master/Dictionary) \ No newline at end of file diff --git a/Passwordy/passwordy.py b/Passwordy/passwordy.py index ee5a7f4..d954bdb 100644 --- a/Passwordy/passwordy.py +++ b/Passwordy/passwordy.py @@ -76,15 +76,15 @@ if __name__ == '__main__': mode = 'password' length = int(args[1]) - elif 'help' in args[1].lower(): - mode = None - print(HELP_MESSAGE) - print(HELP_SENTENCE) - elif 'sent' in args[1].lower() and argc == 2: mode = 'sentence' length = DEFAULT_SENTENCE + elif argc == 2: + mode = None + print(HELP_MESSAGE) + print(HELP_SENTENCE) + elif args[2].isdigit(): mode = 'sentence' length = int(args[2])