diff --git a/sigmf/gui.py b/sigmf/gui.py index b0d47f7..7d44b86 100644 --- a/sigmf/gui.py +++ b/sigmf/gui.py @@ -382,10 +382,12 @@ def add_capture(capture_data_input, values, capture_selector_dict, file_data, fr def main(): import argparse + from sigmf import __version__ as toolversion parser = argparse.ArgumentParser(description='Edit SigMF Archive.') parser.add_argument('-i', '--input', help='Input SigMF Archive Path.', default=None) parser.add_argument('-v', '--verbose', action='count', default=0) + parser.add_argument('--version', action='version', version=f'%(prog)s {toolversion}') args = parser.parse_args() level_lut = { diff --git a/sigmf/validate.py b/sigmf/validate.py index 1da0eb9..f7a13d5 100644 --- a/sigmf/validate.py +++ b/sigmf/validate.py @@ -88,10 +88,15 @@ def main(): from . import sigmffile from . import error - parser = argparse.ArgumentParser(description='Validate SigMF Archive or file pair against JSON schema.') + from sigmf import __version__ as toolversion + + parser = argparse.ArgumentParser(description='Validate SigMF Archive or file pair against JSON schema.', + prog='sigmf_validate') parser.add_argument('filename', help='SigMF path (extension optional).') parser.add_argument('--skip-checksum', action='store_true', help='Skip reading dataset to validate checksum.') parser.add_argument('-v', '--verbose', action='count', default=0) + parser.add_argument('--version', action='version', version=f'%(prog)s {toolversion}') + args = parser.parse_args() level_lut = {