diff --git a/diceware/__init__.py b/diceware/__init__.py index d5f24a66d1dbbb6a2e0ce16da27a75a0a8f2955b..d9addd20a786e6edbb95a3f220deac5c7f09d810 100644 --- a/diceware/__init__.py +++ b/diceware/__init__.py @@ -110,12 +110,12 @@ def handle_options(args): "Get randomness from this source. Possible values: `%s'. " "Default: system" % "', `".join(sorted(random_sources)))) parser.add_argument( - '-w', '--wordlist', default='en_8k', choices=wordlist_names, + '-w', '--wordlist', default='en', choices=wordlist_names, metavar="NAME", help=( "Use words from this wordlist. Possible values: `%s'. " "Wordlists are stored in the folder displayed below. " - "Default: en_8k" % "', `".join(wordlist_names))) + "Default: en" % "', `".join(wordlist_names))) parser.add_argument( 'infile', nargs='?', metavar='INFILE', default=None, type=argparse.FileType('r'), diff --git a/diceware/config.py b/diceware/config.py index de3a3637a20fcb4d61d542becc2f635a61df38bd..a11a06ba61237eb8ddd838cebbc30448c52dba29 100644 --- a/diceware/config.py +++ b/diceware/config.py @@ -32,7 +32,7 @@ OPTIONS_DEFAULTS = dict( specials=0, delimiter="", randomsource="system", - wordlist="en_8k", + wordlist="en", ) diff --git a/diceware/wordlists/wordlist_en_8k.txt b/diceware/wordlists/wordlist_en.txt similarity index 100% rename from diceware/wordlists/wordlist_en_8k.txt rename to diceware/wordlists/wordlist_en.txt diff --git a/tests/exp_help_output.txt b/tests/exp_help_output.txt index dadef71bd18af908a9c2cdd59b501b979c2035ad..5ea4de85f1f27bdbb2011ca8f176c43956ec7d07 100644 --- a/tests/exp_help_output.txt +++ b/tests/exp_help_output.txt @@ -20,9 +20,9 @@ optional arguments: Get randomness from this source. Possible values: `realdice', `system'. Default: system -w NAME, --wordlist NAME - Use words from this wordlist. Possible values: - `en_8k', `en_orig'. Wordlists are stored in the folder - displayed below. Default: en_8k + Use words from this wordlist. Possible values: `en', + `en_orig'. Wordlists are stored in the folder + displayed below. Default: en --version output version information and exit. Wordlists are stored in <WORDLISTS-DIR> diff --git a/tests/test_diceware.py b/tests/test_diceware.py index 8a2bca622864c5ec3814f66995986d7a0096dd27..117d4d0c3fe0a1b3882ba3280c8696528ff6edbf 100644 --- a/tests/test_diceware.py +++ b/tests/test_diceware.py @@ -133,7 +133,7 @@ class TestDicewareModule(object): assert options.version is False assert options.delimiter == "" assert options.randomsource == "system" - assert options.wordlist == "en_8k" + assert options.wordlist == "en" def test_handle_options_infile(self, tmpdir): # we can give an infile diff --git a/tests/test_wordlist.py b/tests/test_wordlist.py index 99161ae3f62961f735bb31f9ddcc43dfaeda430c..0489def9ff7d6b2cb2cf3f03bb3c9f6e68c8b49d 100644 --- a/tests/test_wordlist.py +++ b/tests/test_wordlist.py @@ -55,7 +55,7 @@ class TestWordlistModule(object): assert regexp.match("wordlist_foo.txt") is not None assert regexp.match("wordlist_foo_bar.asc") is not None assert regexp.match("wordlist_name-withdots.txt.asc") is not None - assert regexp.match("wordlist_en_8k.txt") is not None + assert regexp.match("wordlist_en.txt") is not None assert regexp.match("wordlist_en_orig.asc") is not None # We can get the internal wordlist name assert regexp.match("wordlist_foo.txt").groups()[0] == "foo" @@ -116,9 +116,9 @@ class TestWordlistModule(object): def test_get_wordlist_names(self, wordlists_dir): # we can get wordlist names also if directory is empty. - wlist_path = wordlists_dir.join('wordlist_my_en_8k.txt') + wlist_path = wordlists_dir.join('wordlist_my_en.txt') wlist_path.write("some\nirrelevant\nwords") - assert get_wordlist_names() == ['my_en_8k'] + assert get_wordlist_names() == ['my_en'] def test_get_wordlist_names_files_only(self, wordlists_dir): # non-files are ignored when looking for wordlist names @@ -223,7 +223,7 @@ class TestWordList(object): def test_wordlist_en_8k(self): # we can get a list of words out of english 8k wordlist. - en_src = os.path.join(WORDLISTS_DIR, 'wordlist_en_8k.txt') + en_src = os.path.join(WORDLISTS_DIR, 'wordlist_en.txt') w_list = WordList(en_src) long_list = list(w_list) assert long_list[0] == "a"