else
This commit is contained in:
parent
86b26475a7
commit
9d64311ead
2 changed files with 36 additions and 5 deletions
31
Passwordy/README.md
Normal file
31
Passwordy/README.md
Normal file
|
@ -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)
|
|
@ -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])
|
||||
|
|
Loading…
Reference in a new issue