Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
diceware-debian
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drebs
diceware-debian
Commits
5368a8fb
Commit
5368a8fb
authored
8 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Move `--dice-sides` option to main.
parent
0451f247
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
diceware/__init__.py
+7
-0
7 additions, 0 deletions
diceware/__init__.py
tests/exp_help_output.txt
+4
-3
4 additions, 3 deletions
tests/exp_help_output.txt
with
11 additions
and
3 deletions
diceware/__init__.py
+
7
−
0
View file @
5368a8fb
...
...
@@ -116,6 +116,13 @@ def handle_options(args):
"
Use words from this wordlist. Possible values: `%s
'
.
"
"
Wordlists are stored in the folder displayed below.
"
"
Default: en_securedrop
"
%
"'
, `
"
.
join
(
wordlist_names
)))
realdice_group
=
parser
.
add_argument_group
(
"
Arguments related to `realdice
'
randomsource
"
,
)
realdice_group
.
add_argument
(
'
--dice-sides
'
,
default
=
6
,
type
=
int
,
metavar
=
"
N
"
,
help
=
'
Number of sides of dice. Default: 6
'
)
parser
.
add_argument
(
'
infile
'
,
nargs
=
'
?
'
,
metavar
=
'
INFILE
'
,
default
=
None
,
type
=
argparse
.
FileType
(
'
r
'
),
...
...
This diff is collapsed.
Click to expand it.
tests/exp_help_output.txt
+
4
−
3
View file @
5368a8fb
usage: diceware [-h] [-n NUM] [-c | --no-caps] [-s NUM] [-d DELIMITER]
[-r SOURCE] [-w NAME] [-
v] [--version] [--dice-sides N
]
[-r SOURCE] [-w NAME] [-
-dice-sides N] [-v] [--version
]
[INFILE]
Create a passphrase
...
...
@@ -25,7 +25,8 @@ optional arguments:
the folder displayed below. Default: en_securedrop
-v, --verbose Be verbose. Use several times for increased verbosity.
--version output version information and exit.
--dice-sides N Number of sides of dice when using ``realdice`` as
`randomsource`. Default: 6
Arguments related to `realdice' randomsource:
--dice-sides N Number of sides of dice. Default: 6
Wordlists are stored in <WORDLISTS-DIR>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment