Site
Gitweb
Static
projects
/
password-gen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7de13ab
)
Add comment
master
author
Jakob Cornell
<jakob@jcornell.net>
Wed, 18 Sep 2019 22:39:39 +0000
(17:39 -0500)
committer
Jakob Cornell
<jakob@jcornell.net>
Wed, 18 Sep 2019 22:39:39 +0000
(17:39 -0500)
gen_pass.py
patch
|
blob
|
history
diff --git
a/gen_pass.py
b/gen_pass.py
index d7fbb35a950bd42ea74975a125f1aa9e79ccab98..3d32e1d331a5333ccd48e29a88ca5269b5816064 100644
(file)
--- a/
gen_pass.py
+++ b/
gen_pass.py
@@
-5,8
+5,10
@@
import sys
import contextlib
import random
import contextlib
import random
-ap = argparse.ArgumentParser(description = "Generate a random password")
+# argparse apparently uses descriptions as old-style format strings
special = ''.join(string.punctuation).translate({ord('%'): '%%'})
special = ''.join(string.punctuation).translate({ord('%'): '%%'})
+
+ap = argparse.ArgumentParser(description = "Generate a random password")
arg_specs = [
(['-db'], {'help': "SQLite connect string (e.g. file path) to word list database"}),
(['-t'], {'help': "Type of password to generate", 'choices': ['chbs', 'chars']}),
arg_specs = [
(['-db'], {'help': "SQLite connect string (e.g. file path) to word list database"}),
(['-t'], {'help': "Type of password to generate", 'choices': ['chbs', 'chars']}),