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
c84e764f
Commit
c84e764f
authored
9 years ago
by
ulif
Browse files
Options
Downloads
Patches
Plain Diff
Be more accurate in docs.
parent
7c5a06c0
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
diceware/random_sources.py
+8
-2
8 additions, 2 deletions
diceware/random_sources.py
with
8 additions
and
2 deletions
diceware/random_sources.py
+
8
−
2
View file @
c84e764f
...
...
@@ -27,11 +27,17 @@ The `__init__` method of your class will be called with `options`, a set
of options as parsed from the commandline. The initialization code can
use the options to determine further actions or ignore it. The
`__init__` method is also the right place to ask users for one-time
infos you need.
infos you need. This includes infos like the number of sides of a dice,
an API key for random.org or other infos that should not change between
generating different words (but might change from one `diceware` call
to the next).
The `choice` method then, will get a sequence of chars, strings, or
numbers and should pick one of them based on the source of randomness
intended to be utilized by your code.
intended to be utilized by your code. If further user interaction is
required, `choice` might also ask users for input or similar. Typically,
`choice` is called once for each word and once for each special char to
generate.
Finally, to register the source, add some stanza in `setup.py` of your
project that looks like::
...
...
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