Add --count option.

This commit is contained in:
voussoir 2022-11-12 12:42:01 -08:00
parent 355c02cf7e
commit 3ddaa83edd

View file

@ -75,6 +75,7 @@ def random_hex(length):
return token
def passwordy_argparse(args):
for index in range(args.count):
if args.sentence:
password = make_sentence(args.length, args.separator)
else:
@ -155,6 +156,14 @@ def main(argv):
In normal mode, the --groups-of chunks will be joined with this string.
''',
)
parser.add_argument(
'--count',
type=int,
default=1,
help='''
Generate this many passwords, to be printed out one per line.
''',
)
parser.add_argument(
'--letters',
action='store_true',