From b0c83fa7532577112ce57ac060c00666dfc84031 Mon Sep 17 00:00:00 2001 From: ulif <uli@gnufix.de> Date: Sun, 8 May 2016 15:50:21 +0200 Subject: [PATCH] Add `--verbose` option for commandline. --- diceware/__init__.py | 3 +++ tests/exp_help_output.txt | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/diceware/__init__.py b/diceware/__init__.py index a445d9c..9834639 100644 --- a/diceware/__init__.py +++ b/diceware/__init__.py @@ -120,6 +120,9 @@ def handle_options(args): type=argparse.FileType('r'), help="Input wordlist. `-' will read from stdin.", ) + parser.add_argument( + '-v', '--verbose', action='count', + help='Be verbose. Use several times for increased verbosity.') parser.add_argument( '--version', action='store_true', help='output version information and exit.', diff --git a/tests/exp_help_output.txt b/tests/exp_help_output.txt index 3401d8f..15baa22 100644 --- a/tests/exp_help_output.txt +++ b/tests/exp_help_output.txt @@ -1,5 +1,5 @@ usage: diceware [-h] [-n NUM] [-c | --no-caps] [-s NUM] [-d DELIMITER] - [-r SOURCE] [-w NAME] [--version] + [-r SOURCE] [-w NAME] [-v] [--version] [INFILE] Create a passphrase @@ -23,6 +23,7 @@ optional arguments: Use words from this wordlist. Possible values: `en', `en_orig', `en_securedrop'. Wordlists are stored in the folder displayed below. Default: en_securedrop + -v, --verbose Be verbose. Use several times for increased verbosity. --version output version information and exit. Wordlists are stored in <WORDLISTS-DIR> -- GitLab