Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sigmf_gui/_validate: add --version option #5

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
sigmf_gui/_validate: add --version option
As needed for automatic generation of man pages

Signed-off-by: Marcus Müller <[email protected]>
marcusmueller committed Jan 29, 2023
commit ff9248524a33abaee62f4edca8b612ada90e869f
2 changes: 2 additions & 0 deletions sigmf/gui.py
Original file line number Diff line number Diff line change
@@ -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 = {
7 changes: 6 additions & 1 deletion sigmf/validate.py
Original file line number Diff line number Diff line change
@@ -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 = {