From db8b769faaa22dbbcf451069d5098d9fd0b3db94 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Tue, 5 May 2026 12:07:32 +0000 Subject: [PATCH] help notes cleanups throughout (whitespace, var renames) --- mmgen/help/__init__.py | 2 ++ mmgen/help/addrimport.py | 8 +++++-- mmgen/help/help_notes.py | 29 +++++++++++++++--------- mmgen/help/seedsplit.py | 4 ++-- mmgen/help/subwallet.py | 3 ++- mmgen/help/swaptxcreate.py | 1 + mmgen/help/swaptxcreate_examples.py | 1 + mmgen/help/txcreate.py | 1 + mmgen/help/txcreate_examples.py | 3 +++ mmgen/help/txsign.py | 1 + mmgen/help/xmrwallet.py | 6 ++--- mmgen/main_addrgen.py | 31 +++++++++---------------- mmgen/main_msg.py | 2 -- mmgen/main_passgen.py | 35 ++++++++++++----------------- mmgen/main_regtest.py | 2 +- mmgen/main_seedjoin.py | 9 +++----- mmgen/main_split.py | 3 ++- mmgen/main_tool.py | 6 ++--- mmgen/main_txbump.py | 15 +++++-------- mmgen/main_txcreate.py | 12 +++++----- mmgen/main_txdo.py | 28 +++++++++-------------- mmgen/main_txsend.py | 1 + mmgen/main_txsign.py | 12 ++++------ mmgen/main_wallet.py | 21 ++++++----------- mmgen/main_xmrwallet.py | 7 ++---- 25 files changed, 110 insertions(+), 133 deletions(-) diff --git a/mmgen/help/__init__.py b/mmgen/help/__init__.py index 6096e78b..fcd57064 100755 --- a/mmgen/help/__init__.py +++ b/mmgen/help/__init__.py @@ -103,7 +103,9 @@ class Help: def gen_output(): yield ' {} {}'.format(gc.prog_name.upper() + ':', opts.opts_data['text']['desc'].strip()) + yield '' yield make_usage_str(cfg, caller='help') + yield '' yield self.help_type.upper().replace('_', ' ') + ':' # process code for options diff --git a/mmgen/help/addrimport.py b/mmgen/help/addrimport.py index 8b363b92..ed710a28 100755 --- a/mmgen/help/addrimport.py +++ b/mmgen/help/addrimport.py @@ -16,6 +16,7 @@ def help(proto, cfg): match proto.base_proto: case 'Bitcoin': return """ + Rescanning now uses the ‘scantxoutset’ RPC call and a selective scan of blocks containing the relevant UTXOs for much faster performance than the previous implementation. The rescan operation typically takes around two @@ -31,9 +32,11 @@ the blockchain may take up to several hours. A full rescan is required if you plan to use ‘mmgen-tool txhist’ or the automatic change address functionality of ‘mmgen-txcreate’, or wish to see which addresses in your tracking wallet are used. Without it, all addresses -without balances will be displayed as new.""" +without balances will be displayed as new. +""" case 'Monero': return """ + For Monero, --autosign is required, and a key-address file on the removable device is used instead of a user-specified address file as with other coins. @@ -50,6 +53,7 @@ configured via --xmrwallets comprises the user’s tracking wallet. If a view-only wallet for a given address already exists, it’s left untouched and no action is performed. To add view-only wallets to your tracking wallet, just specify additional wallet indexes via --xmrwallets during the offline -setup process.""" +setup process. +""" case _: return '' diff --git a/mmgen/help/help_notes.py b/mmgen/help/help_notes.py index c266d8cb..2f471552 100755 --- a/mmgen/help/help_notes.py +++ b/mmgen/help/help_notes.py @@ -12,6 +12,9 @@ help: help notes functions for MMGen suite commands """ +# To permit concatenation of blocks of help text in any order, each block (if not empty) +# should start with two newlines and end with one newline. + class help_notes: def __init__(self, proto, cfg): @@ -91,11 +94,10 @@ class help_notes: def password_formats(self): from ..passwdlist import PasswordList pwi_fs = '{:8} {:1} {:26} {:<7} {:<7} {}' - return '\n '.join( + return '\n\n ' + '\n '.join( [pwi_fs.format('Code', '', 'Description', 'Min Len', 'Max Len', 'Default Len')] + [pwi_fs.format(k, '-', v.desc, v.min_len, v.max_len, v.dfl_len) - for k, v in PasswordList.pw_info.items()] - ) + for k, v in PasswordList.pw_info.items()]) def dfl_mmtype(self): from ..addr import MMGenAddrType @@ -104,19 +106,21 @@ class help_notes: def address_types(self): from ..addr import MMGenAddrType return """ + ADDRESS TYPES: Code Type Description ---- ---- ----------- """ + format('\n '.join(['‘{}’ {:<12} - {}'.format(k, v.name, v.desc) - for k, v in MMGenAddrType.mmtypes.items()])) + for k, v in MMGenAddrType.mmtypes.items()])) + '\n' def fmt_codes(self): from ..wallet import format_fmt_codes return """ + FMT CODES: - """ + '\n '.join(format_fmt_codes().splitlines()) + """ + '\n '.join(format_fmt_codes().splitlines()) + '\n' def coin_id(self): return self.proto.coin_id @@ -148,6 +152,7 @@ FMT CODES: def gas_limit(self, target): return """ + GAS LIMIT This option specifies the maximum gas allowance for an Ethereum transaction. @@ -158,8 +163,7 @@ Parameter must be an integer or one of the special values ‘fallback’ (for a locally computed sane default) or ‘auto’ (for gas estimate via an RPC call, in the case of a token transaction, or locally computed default, in the case of a standard transaction). The default is ‘auto’. - - """ if target == 'swaptx' or self.proto.base_coin == 'ETH' else '' +""" if target == 'swaptx' or self.proto.base_coin == 'ETH' else '' def fee(self, all_coins=False): @@ -168,6 +172,7 @@ of a standard transaction). The default is ‘auto’. from ..tx import BaseTX text = """ + FEE SPECIFICATION Transaction fees, both on the command line and at the interactive prompt, may @@ -187,24 +192,26 @@ as {r}, using an integer followed by {l}, for{s}{u}""".format( r = BaseTX(cfg=self.cfg, proto=eth_proto).rel_fee_desc, l = self.fee_spec_letters(use_quotes=True, proto=eth_proto), u = self.fee_spec_names(proto=eth_proto, linebreak='\n')) - + ' (for Ethereum)\n\n') + + ' (for Ethereum)\n') else: - return text + '.\n\n' + return text + '.\n' def passwd(self): return """ + PASSPHRASE NOTE: For passphrases all combinations of whitespace are equal, and leading and trailing space are ignored. This permits reading passphrase or brainwallet data from a multi-line file with free spacing and indentation. -""".strip() +""" def brainwallet(self): return """ + BRAINWALLET NOTE: To thwart dictionary attacks, it’s recommended to use a strong hash preset with brainwallets. For a brainwallet passphrase to generate the correct seed, the same seed length and hash preset parameters must always be used. -""".strip() +""" diff --git a/mmgen/help/seedsplit.py b/mmgen/help/seedsplit.py index 0c7d7538..8f9a99ee 100755 --- a/mmgen/help/seedsplit.py +++ b/mmgen/help/seedsplit.py @@ -15,6 +15,7 @@ help.seedsplit: seedsplit help notes for MMGen suite def help(proto, cfg): from ..seedsplit import SeedShareIdx, SeedShareCount, MasterShareIdx return """ + COMMAND NOTES: This command generates shares one at a time. Shares may be output to any @@ -98,8 +99,7 @@ EXAMPLES: $ mmgen-seedsplit -M4 -o hincog -J my.hincog,1325 1:2 # Step M (share A) $ mmgen-seedsplit -M4 -o bip39 2:2 # Step N (share B) $ mmgen-seedjoin -M4 -H my.hincog,1325 - -""".strip().format( +""".format( si = SeedShareIdx, sc = SeedShareCount, mi = MasterShareIdx) diff --git a/mmgen/help/subwallet.py b/mmgen/help/subwallet.py index eaf7a7f0..62b92db5 100755 --- a/mmgen/help/subwallet.py +++ b/mmgen/help/subwallet.py @@ -15,6 +15,7 @@ help.subwallet: subwallet help notes for the MMGen Wallet suite def help(proto, cfg): from ..subseed import SubSeedIdxRange return f""" + SUBWALLETS: Subwallets (subseeds) are specified by a ‘Subseed Index’ consisting of: @@ -49,4 +50,4 @@ Seed ID collisions among them doesn’t present a problem. A safe rule of thumb, therefore, is for *each user* to derive all of his/her subwallets from a single parent. This leaves each user with a total of two million subwallets, which should be enough for most practical purposes. -""".strip() +""" diff --git a/mmgen/help/swaptxcreate.py b/mmgen/help/swaptxcreate.py index 859104d6..edc1e575 100755 --- a/mmgen/help/swaptxcreate.py +++ b/mmgen/help/swaptxcreate.py @@ -14,6 +14,7 @@ help.swaptxcreate: swaptxcreate and swaptxdo help notes for the MMGen Wallet sui def help(proto, cfg): return """ + This script is similar in operation to ‘mmgen-txcreate’, only with additional steps. Users are advised to first familiarize themselves with the use of that script before attempting to perform a swap with this one. diff --git a/mmgen/help/swaptxcreate_examples.py b/mmgen/help/swaptxcreate_examples.py index 380f37c8..97ed7e56 100755 --- a/mmgen/help/swaptxcreate_examples.py +++ b/mmgen/help/swaptxcreate_examples.py @@ -17,6 +17,7 @@ from ..cfg import gc def help(proto, cfg): return f""" + EXAMPLES: Display available swap assets: diff --git a/mmgen/help/txcreate.py b/mmgen/help/txcreate.py index 3eecef22..4ff0f7e0 100755 --- a/mmgen/help/txcreate.py +++ b/mmgen/help/txcreate.py @@ -52,6 +52,7 @@ specified. """ if proto.has_usr_fee else '' return f""" + The transaction’s outputs are listed on the command line, while its inputs are chosen from a list of the wallet’s unspent outputs via an interactive menu. Alternatively, inputs may be specified using the --inputs option. diff --git a/mmgen/help/txcreate_examples.py b/mmgen/help/txcreate_examples.py index cb5a88a0..b3650786 100755 --- a/mmgen/help/txcreate_examples.py +++ b/mmgen/help/txcreate_examples.py @@ -27,6 +27,7 @@ def help(proto, cfg): match proto.base_proto: case 'Bitcoin': return f""" + EXAMPLES: Send 0.123 {proto.coin} to an external {proto.name} address, returning the change to a @@ -60,6 +61,7 @@ EXAMPLES: case 'Monero': return f""" + EXAMPLES: Send 0.123 {proto.coin} to an external {proto.name} address: @@ -73,6 +75,7 @@ EXAMPLES: case _: return f""" + EXAMPLES: Send 0.123 {proto.coin} to an external {proto.name} address: diff --git a/mmgen/help/txsign.py b/mmgen/help/txsign.py index b1bb3e88..56cd7433 100755 --- a/mmgen/help/txsign.py +++ b/mmgen/help/txsign.py @@ -21,6 +21,7 @@ def help(proto, cfg): return CoinDaemon(cfg, network_id=proto.coin).exec_fn if proto.coin in CoinDaemon.coins else 'bitcoind' return """ + Transactions may contain both {pnm} or non-{pnm} input addresses. To sign non-{pnm} inputs, a coin daemon wallet dump or flat key list is used diff --git a/mmgen/help/xmrwallet.py b/mmgen/help/xmrwallet.py index 743d347f..7b51c291 100755 --- a/mmgen/help/xmrwallet.py +++ b/mmgen/help/xmrwallet.py @@ -16,6 +16,7 @@ def help(proto, cfg): from ..xmrwallet import uarg_info return """ + Many operations take an optional ‘wallets’ argument: one or more address indexes (expressed as a comma-separated list and/or hyphenated range) in the default or specified key-address file, each corresponding to a Monero @@ -462,9 +463,8 @@ Tutorial above. Once you’ve gained proficiency with the autosigning process and feel ready to delete your old hot wallets, make sure to do so securely using ‘shred’, ‘wipe’ or some other secure deletion utility. -""".strip().format( +""".format( newaddr_spec = uarg_info['newaddr_spec'].annot, label_spec = uarg_info['label_spec'].annot, transfer_spec = uarg_info['transfer_spec'].annot, - sweep_spec = uarg_info['sweep_spec'].annot, -) + sweep_spec = uarg_info['sweep_spec'].annot) diff --git a/mmgen/main_addrgen.py b/mmgen/main_addrgen.py index 49c26655..e0a50709 100755 --- a/mmgen/main_addrgen.py +++ b/mmgen/main_addrgen.py @@ -31,7 +31,7 @@ if gc.prog_name == 'mmgen-keygen': gen_clsname = 'KeyAddrList' gen_desc = 'secret keys' filter_codes = ['-', 'k'] - note_addrkey = 'By default, both addresses and secret keys are generated.\n\n' + note_addrkey = '\n\nBy default, both addresses and secret keys are generated.' else: gen_what = 'addresses' gen_clsname = 'AddrList' @@ -86,19 +86,12 @@ opts_data = { NOTES FOR THIS COMMAND Address indexes are given as a comma-separated list and/or hyphen-separated -range(s). +range(s).{n_ak} -{n_addrkey}If available, the libsecp256k1 library will be used for address generation. +If available, the libsecp256k1 library will be used for address generation. - NOTES FOR ALL GENERATOR COMMANDS - -{n_sw}{n_pw}{n_bw} - -{n_at} - -{n_fmt} -""" + NOTES FOR ALL GENERATOR COMMANDS{n_sw}{n_pw}{n_bw}{n_at}{n_fc}""" }, 'code': { 'options': lambda proto, help_notes, cfg, s: s.format( @@ -109,16 +102,14 @@ range(s). pnm = gc.proj_name, what = gen_what, cfg = cfg, - gc = gc, - ), + gc = gc), 'notes': lambda help_mod, help_notes, s: s.format( - n_addrkey = note_addrkey, - n_sw = help_mod('subwallet')+'\n\n', - n_pw = help_notes('passwd')+'\n\n', - n_bw = help_notes('brainwallet'), - n_fmt = help_notes('fmt_codes'), - n_at = help_notes('address_types'), - ) + n_ak = note_addrkey, + n_sw = help_mod('subwallet'), + n_pw = help_notes('passwd'), + n_bw = help_notes('brainwallet'), + n_fc = help_notes('fmt_codes'), + n_at = help_notes('address_types')) } } diff --git a/mmgen/main_msg.py b/mmgen/main_msg.py index a270ebb5..1c3970bb 100755 --- a/mmgen/main_msg.py +++ b/mmgen/main_msg.py @@ -131,10 +131,8 @@ following format: where ADDRTYPE_CODE is a one-letter address type code from the list below, and ADDR_IDX_SPEC is a comma-separated list of address indexes or hyphen-separated address index ranges. - {n_at} - NOTES Message signing operations are supported for Bitcoin, Ethereum and code forks diff --git a/mmgen/main_passgen.py b/mmgen/main_passgen.py index 50d652bb..cf53a4ee 100755 --- a/mmgen/main_passgen.py +++ b/mmgen/main_passgen.py @@ -80,9 +80,9 @@ range(s). Changing either the password format (base32,base58) or length alters the seed and thus generates a completely new set of passwords. -PASSWORD FORMATS: - {pfi} +PASSWORD FORMATS:{n_pf} + EXAMPLES: @@ -104,14 +104,7 @@ EXAMPLES: about inadvertent reuse of private data. - NOTES FOR ALL GENERATOR COMMANDS - -{n_pw} - -{n_bw} - -{n_fmt} -""" + NOTES FOR ALL GENERATOR COMMANDS{n_pw}{n_bw}{n_fc}""" }, 'code': { 'options': lambda cfg, help_notes, s: s.format( @@ -121,17 +114,17 @@ EXAMPLES: gc = gc, ), 'notes': lambda cfg, help_notes, s: s.format( - cfg = cfg, - i58 = pwi['b58'], - i32 = pwi['b32'], - i39 = pwi['bip39'], - ml = MMGenPWIDString.max_len, - fs = '", "'.join(MMGenPWIDString.forbidden), - n_pw = help_notes('passwd'), - n_bw = help_notes('brainwallet'), - pfi = help_notes('password_formats'), - n_fmt = help_notes('fmt_codes'), - gc = gc, + cfg = cfg, + i58 = pwi['b58'], + i32 = pwi['b32'], + i39 = pwi['bip39'], + ml = MMGenPWIDString.max_len, + fs = '", "'.join(MMGenPWIDString.forbidden), + n_pw = help_notes('passwd'), + n_bw = help_notes('brainwallet'), + n_pf = help_notes('password_formats'), + n_fc = help_notes('fmt_codes'), + gc = gc, ) } } diff --git a/mmgen/main_regtest.py b/mmgen/main_regtest.py index 4ed5a660..40d64b3b 100755 --- a/mmgen/main_regtest.py +++ b/mmgen/main_regtest.py @@ -53,7 +53,7 @@ opts_data = { cli - execute an RPC call with supplied arguments wallet_cli - execute a wallet RPC call with supplied arguments (wallet is first argument) - """ +""" } } diff --git a/mmgen/main_seedjoin.py b/mmgen/main_seedjoin.py index d5fa0eae..4648b9ee 100755 --- a/mmgen/main_seedjoin.py +++ b/mmgen/main_seedjoin.py @@ -70,10 +70,7 @@ The --id-str option is required only for master share joins. For ordinary joins it will be ignored. For usage examples, see the help screen for the 'mmgen-seedsplit' command. - -{n_pw} - -{f} +{n_pw}{n_fc} """ }, 'code': { @@ -84,8 +81,8 @@ For usage examples, see the help screen for the 'mmgen-seedsplit' command. gc = gc, ), 'notes': lambda cfg, help_notes, s: s.format( - f = help_notes('fmt_codes'), - n_pw = help_notes('passwd'), + n_fc = help_notes('fmt_codes'), + n_pw = help_notes('passwd'), ) } } diff --git a/mmgen/main_split.py b/mmgen/main_split.py index d3f1d4c3..962be052 100755 --- a/mmgen/main_split.py +++ b/mmgen/main_split.py @@ -51,7 +51,8 @@ opts_data = { -l, --locktime= t Lock time (block height or unix seconds) (default: {bh}) """, - 'notes': f"""\n + 'notes': f""" + This command creates two transactions: one (with the timelock) to be broadcast on the long chain and one on the short chain after a replayable chain fork. Only {gc.proj_name} addresses may be spent to. diff --git a/mmgen/main_tool.py b/mmgen/main_tool.py index d89a01dd..9398afb5 100755 --- a/mmgen/main_tool.py +++ b/mmgen/main_tool.py @@ -59,7 +59,7 @@ opts_data = { COMMANDS -{ch} +{n_th} Type ‘{pn} help ’ for help on a particular command """ }, @@ -71,8 +71,8 @@ Type ‘{pn} help ’ for help on a particular command gc = gc, ), 'notes': lambda cfg, s, help_notes: s.format( - ch = help_notes('tool_help'), - pn = gc.prog_name) + n_th = help_notes('tool_help'), + pn = gc.prog_name) } } diff --git a/mmgen/main_txbump.py b/mmgen/main_txbump.py index 7f50aa0a..2b0ce7d6 100755 --- a/mmgen/main_txbump.py +++ b/mmgen/main_txbump.py @@ -115,12 +115,9 @@ When bumping a swap transaction, the swap protocol’s quote server on the Internet must be reachable either directly or via the SOCKS5 proxy specified with the --proxy option. To improve privacy, it’s recommended to proxy requests to the quote server via Tor or some other anonymity network. - -{g}{F}{s} +{n_gl}{n_fe}{n_ts} Seed source files must have the canonical extensions listed in the 'FileExt' -column below: - -{f} +column below:{n_fc} """ }, 'code': { @@ -138,10 +135,10 @@ column below: dsl = help_notes('dfl_seed_len'), cu = proto.coin), 'notes': lambda help_mod, help_notes, s: s.format( - g = help_notes('gas_limit', target=None), - F = help_notes('fee'), - s = help_mod('txsign'), - f = help_notes('fmt_codes')), + n_gl = help_notes('gas_limit', target=None), + n_fe = help_notes('fee'), + n_ts = help_mod('txsign'), + n_fc = help_notes('fmt_codes')), } } diff --git a/mmgen/main_txcreate.py b/mmgen/main_txcreate.py index ff70c7eb..aa00f968 100755 --- a/mmgen/main_txcreate.py +++ b/mmgen/main_txcreate.py @@ -95,7 +95,7 @@ opts_data = { -- -y, --yes Answer 'yes' to prompts, suppress non-essential output e- -X, --cached-balances Use cached balances """, - 'notes': '\n{c}\n{n_at}\n\n{g}{F}{x}', + 'notes': '{n_tc}{n_at}{n_gl}{n_fe}{n_cx}', }, 'code': { 'usage': lambda cfg, proto, help_notes, s: s.format( @@ -113,11 +113,11 @@ opts_data = { x_all = fmt_list(cfg._autoset_opts['swap_proto'].choices, fmt='no_spc'), x_dfl = cfg._autoset_opts['swap_proto'].choices[0]), 'notes': lambda cfg, help_mod, help_notes, s: s.format( - c = help_mod(f'{target}create'), - g = help_notes('gas_limit', target), - F = help_notes('fee', all_coins={'tx': False, 'swaptx': True}[target]), - n_at = help_notes('address_types'), - x = help_mod(f'{target}create_examples')) + n_tc = help_mod(f'{target}create'), + n_gl = help_notes('gas_limit', target), + n_fe = help_notes('fee', all_coins={'tx': False, 'swaptx': True}[target]), + n_at = help_notes('address_types'), + n_cx = help_mod(f'{target}create_examples')) } } diff --git a/mmgen/main_txdo.py b/mmgen/main_txdo.py index d0487e42..035f2b4a 100755 --- a/mmgen/main_txdo.py +++ b/mmgen/main_txdo.py @@ -119,19 +119,11 @@ opts_data = { -- -y, --yes Answer 'yes' to prompts, suppress non-essential output -- -z, --show-hash-presets Show information on available hash presets """, - 'notes': """ -{c} -{n_at} + 'notes': """{n_tc}{n_at}{n_gl}{n_fe} -{g}{F} - SIGNING NOTES -{s} + SIGNING NOTES{n_ts} Seed source files must have the canonical extensions listed in the 'FileExt' -column below: - -{f} - -{x}""" +column below:{n_fc}{n_cx}""" }, 'code': { 'usage': lambda cfg, proto, help_notes, s: s.format( @@ -157,13 +149,13 @@ column below: x_all = fmt_list(cfg._autoset_opts['swap_proto'].choices, fmt='no_spc'), x_dfl = cfg._autoset_opts['swap_proto'].choices[0]), 'notes': lambda cfg, help_mod, help_notes, s: s.format( - c = help_mod(f'{target}create'), - g = help_notes('gas_limit', target), - F = help_notes('fee'), - n_at = help_notes('address_types'), - f = help_notes('fmt_codes'), - s = help_mod('txsign'), - x = help_mod(f'{target}create_examples')) + n_tc = help_mod(f'{target}create'), + n_gl = help_notes('gas_limit', target), + n_fe = help_notes('fee'), + n_at = help_notes('address_types'), + n_fc = help_notes('fmt_codes'), + n_ts = help_mod('txsign'), + n_cx = help_mod(f'{target}create_examples')) } } diff --git a/mmgen/main_txsend.py b/mmgen/main_txsend.py index d6ea52c1..791b742b 100755 --- a/mmgen/main_txsend.py +++ b/mmgen/main_txsend.py @@ -71,6 +71,7 @@ opts_data = { -y, --yes Answer 'yes' to prompts, suppress non-essential output """, 'notes': """ + With --autosign, combined with --status or --receipt, the optional index or range arg represents an index or range into the list of sent transaction files on the removable device, in reverse chronological order. ‘0’ (the default) diff --git a/mmgen/main_txsign.py b/mmgen/main_txsign.py index 9f16e389..07d8fedc 100755 --- a/mmgen/main_txsign.py +++ b/mmgen/main_txsign.py @@ -72,13 +72,9 @@ opts_data = { to non-wallet addresses -y, --yes Answer 'yes' to prompts, suppress non-essential output """, - 'notes': """ -{t} + 'notes': """{n_ts} Seed source files must have the canonical extensions listed in the 'FileExt' -column below: - -{f} -""" +column below:{n_fc}""" }, 'code': { 'options': lambda cfg, proto, help_notes, s: s.format( @@ -93,8 +89,8 @@ column below: ss_max = SubSeedIdxRange.max_idx, cu = proto.coin), 'notes': lambda help_mod, help_notes, s: s.format( - t = help_mod('txsign'), - f = help_notes('fmt_codes')), + n_ts = help_mod('txsign'), + n_fc = help_notes('fmt_codes')), } } diff --git a/mmgen/main_wallet.py b/mmgen/main_wallet.py index 4493139d..63d5fa12 100755 --- a/mmgen/main_wallet.py +++ b/mmgen/main_wallet.py @@ -119,12 +119,7 @@ opts_data = { -w -S, --stdout Write wallet data to stdout instead of file -- -v, --verbose Produce more verbose output """, - 'notes': """ - -{n_ss}{n_sw}{n_pw}{n_bw} - -{f} -""" + 'notes': '{n_ss}{n_sw}{n_pw}{n_bw}{n_fc}' }, 'code': { 'options': lambda cfg, help_notes, s: s.format( @@ -134,15 +129,13 @@ opts_data = { ms_max = help_notes('MasterShareIdx').max_val, dsl = help_notes('dfl_seed_len'), cfg = cfg, - gc = gc, - ), + gc = gc), 'notes': lambda cfg, help_mod, help_notes, s: s.format( - f = help_notes('fmt_codes'), - n_ss = ('', help_mod('seedsplit')+'\n\n')[do_ss_note], - n_sw = ('', help_mod('subwallet')+'\n\n')[do_sw_note], - n_pw = help_notes('passwd'), - n_bw = ('', '\n\n'+help_notes('brainwallet'))[do_bw_note] - ) + n_ss = ('', help_mod('seedsplit'))[do_ss_note], + n_sw = ('', help_mod('subwallet'))[do_sw_note], + n_pw = help_notes('passwd'), + n_bw = ('', help_notes('brainwallet'))[do_bw_note], + n_fc = help_notes('fmt_codes')) } } diff --git a/mmgen/main_xmrwallet.py b/mmgen/main_xmrwallet.py index 02b322c0..61826a4c 100755 --- a/mmgen/main_xmrwallet.py +++ b/mmgen/main_xmrwallet.py @@ -86,10 +86,7 @@ opts_data = { -U, --wallet-rpc-user=user Wallet RPC username (currently: {cfg.monero_wallet_rpc_user!r}) -P, --wallet-rpc-password=pass Wallet RPC password (currently: [scrubbed]) """, - 'notes': """ - -{xmrwallet_help} -""" + 'notes': '{n_xw}' }, 'code': { 'options': lambda cfg, help_notes, s: s.format( @@ -101,7 +98,7 @@ opts_data = { tp = fmt_dict(xmrwallet.tx_priorities, fmt='equal_compact') ), 'notes': lambda help_mod, s: s.format( - xmrwallet_help = help_mod('xmrwallet') + n_xw = help_mod('xmrwallet') ) } }