Skip to content

Commit

Permalink
sigmf_gui/_validate: add --version option (#5)
Browse files Browse the repository at this point in the history
As needed for automatic generation of man pages

Signed-off-by: Marcus Müller <[email protected]>
  • Loading branch information
marcusmueller authored Apr 19, 2023
1 parent ab5e4d4 commit 0578961
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions sigmf/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
7 changes: 6 additions & 1 deletion sigmf/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 0578961

Please sign in to comment.