commit 3f98b0dcf42bf82a31ba5d91c8dbfbc91f1a9a87
parent 0a974fc6c297e1404a32dcf0200672afaa265aa4
Author: lash <dev@holbrook.no>
Date: Sat, 12 Nov 2022 13:32:14 +0000
Add new flags to man page generation
Diffstat:
3 files changed, 18 insertions(+), 3 deletions(-)
diff --git a/chainlib/cli/man.py b/chainlib/cli/man.py
@@ -87,14 +87,12 @@ class DocEntry:
class DocGenerator:
-# def __init__(self, arg_flags, config):
def __init__(self, arg_flags):
#self.config = config
self.arg_flags = arg_flags
self.docs = {}
self.envs = {}
self.__argflag_list = ArgFlag()
-# self.envs = {}
def __str__(self):
@@ -266,6 +264,22 @@ class DocGenerator:
o.set_groff('Produce output most optimized for machines.')
self.docs['raw'] = o
+ o = DocEntry('-0')
+ o.set_groff('Omit newline to output')
+ self.docs['0'] = o
+
+ if self.arg_flags & self.__argflag_list.VALUE:
+ o = DocEntry('--total')
+ o.set_groff('Deduct calculated fee from value.')
+ self.docs['total'] = o
+
+
+ if self.arg_flags & self.__argflag_list.TAB:
+ o = DocEntry('-o', '--output-key')
+ o.set_groff('Include output by key name')
+ self.docs['o'] = o
+
+
if self.arg_flags & (self.__argflag_list.SIGN | self.__argflag_list.NONCE):
o = DocEntry('--nonce')
o.set_groff('Explicitly set nonce to use for transaction.')
diff --git a/scripts/chainlib-man.py b/scripts/chainlib-man.py
@@ -100,6 +100,7 @@ flags_debug = argflag.names(flags)
logg.debug('apply arg flags {}: {}'.format(flags, ', '.join(flags_debug)))
+# TODO: unfortunately, if arguments are added in chainlib/cli/arg.py they still also have to be manually added in chainlib/cli/man.py
g = DocGenerator(flags)
toolname = args.n
diff --git a/setup.cfg b/setup.cfg
@@ -3,7 +3,7 @@ name=chainlib
license=WTFPL2
author_email=dev@holbrook.no
description=Generic blockchain access library and tooling
-version=0.4.0
+version=0.4.1
url=https://gitlab.com/chaintools/chainlib
author=Louis Holbrook