diff --git a/mmgen/data/version b/mmgen/data/version index d3df1164..f5041ddb 100644 --- a/mmgen/data/version +++ b/mmgen/data/version @@ -1 +1 @@ -13.1.dev009 +13.1.dev010 diff --git a/mmgen/main_tool.py b/mmgen/main_tool.py index 2cbbdfe3..8b859f80 100755 --- a/mmgen/main_tool.py +++ b/mmgen/main_tool.py @@ -67,64 +67,66 @@ Type '{pn} help ' for help on a particular command } } +# NB: Command groups and commands are displayed on the help screen in the following order, +# so keep the command names sorted mods = { 'help': ( 'help', 'usage', ), 'util': ( + 'b32tohex', + 'b58chktohex', + 'b58tobytes', + 'b58tohex', + 'b6dtohex', 'bytespec', - 'to_bytespec', - 'randhex', - 'hexreverse', - 'hexlify', - 'unhexlify', - 'hexdump', - 'unhexdump', + 'bytestob58', 'hash160', 'hash256', + 'hexdump', + 'hexlify', + 'hexreverse', + 'hextob32', + 'hextob58', + 'hextob58chk', + 'hextob6d', 'id6', - 'str2id6', 'id8', 'randb58', - 'bytestob58', - 'b58tobytes', - 'hextob58', - 'b58tohex', - 'hextob58chk', - 'b58chktohex', - 'hextob32', - 'b32tohex', - 'hextob6d', - 'b6dtohex', + 'randhex', + 'str2id6', + 'to_bytespec', + 'unhexdump', + 'unhexlify', ), 'coin': ( - 'randwif', - 'randpair', - 'wif2hex', - 'hex2wif', - 'wif2addr', - 'wif2redeem_script', - 'wif2segwit_pair', - 'privhex2addr', - 'privhex2pubhex', - 'pubhex2addr', - 'pubhex2redeem_script', - 'redeem_script2addr', - 'pubhash2addr', 'addr2pubhash', 'addr2scriptpubkey', + 'hex2wif', + 'privhex2addr', + 'privhex2pubhex', + 'pubhash2addr', + 'pubhex2addr', + 'pubhex2redeem_script', + 'randpair', + 'randwif', + 'redeem_script2addr', 'scriptpubkey2addr', + 'wif2addr', + 'wif2hex', + 'wif2redeem_script', + 'wif2segwit_pair', ), 'mnemonic': ( - 'mn_rand128', - 'mn_rand192', - 'mn_rand256', 'hex2mn', 'mn2hex', 'mn2hex_interactive', - 'mn_stats', 'mn_printlist', + 'mn_rand128', + 'mn_rand192', + 'mn_rand256', + 'mn_stats', ), 'file': ( 'addrfile_chksum', @@ -133,30 +135,30 @@ mods = { 'txview', ), 'filecrypt': ( - 'encrypt', 'decrypt', + 'encrypt', ), 'fileutil': ( 'find_incog_data', 'rand2file', ), 'wallet': ( + 'gen_addr', + 'gen_key', 'get_subseed', 'get_subseed_by_seed_id', - 'list_subseeds', 'list_shares', - 'gen_key', - 'gen_addr', + 'list_subseeds', ), 'rpc': ( + 'add_label', 'daemon_version', 'getbalance', 'listaddress', 'listaddresses', - 'twview', - 'add_label', - 'remove_label', 'remove_address', + 'remove_label', + 'twview', ), } diff --git a/mmgen/opts.py b/mmgen/opts.py index 88e8d089..bb77b51b 100755 --- a/mmgen/opts.py +++ b/mmgen/opts.py @@ -40,7 +40,7 @@ def usage(): Die(1,mmgen.share.Opts.make_usage_str(g.prog_name,'user',usage_data)) def version(): - from .util import Die + from .util import Die,fmt Die(0,fmt(f""" {g.prog_name.upper()} version {g.version} Part of the {g.proj_name} suite, an online/offline cryptocurrency wallet for the diff --git a/setup.cfg b/setup.cfg index 80f7b17c..88369786 100644 --- a/setup.cfg +++ b/setup.cfg @@ -42,6 +42,7 @@ install_requires = packages = mmgen mmgen.share + mmgen.tool mmgen.altcoins mmgen.altcoins.eth mmgen.altcoins.eth.pyethereum diff --git a/test/test_py_d/ts_misc.py b/test/test_py_d/ts_misc.py index e39704c0..b86639e0 100755 --- a/test/test_py_d/ts_misc.py +++ b/test/test_py_d/ts_misc.py @@ -48,6 +48,7 @@ class TestSuiteHelp(TestSuiteBase): passthru_opts = ('daemon_data_dir','rpc_port','coin','testnet') cmd_group = ( ('usage', (1,'usage message',[])), + ('version', (1,'version message',[])), ('helpscreens', (1,'help screens', [])), ('longhelpscreens', (1,'help screens (--longhelp)',[])), ('show_hash_presets', (1,'info screen (--show-hash-presets)',[])), @@ -61,6 +62,11 @@ class TestSuiteHelp(TestSuiteBase): t.req_exit_val = 1 return t + def version(self): + t = self.spawn(f'mmgen-tool',['--version']) + t.expect('MMGEN-TOOL version') + return t + def helpscreens(self,arg='--help',scripts=(),expect='USAGE:.*OPTIONS:'): scripts = scripts or tuple(s.replace('mmgen-','') for s in os.listdir('cmds'))