We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Openob does not show the help for the cli options for rx and tx mode.
Here is a patch:
whohoho@ef613ef
diff --git a/bin/openob b/bin/openob index 64ee4c2..4ce9b44 100755 --- a/bin/openob +++ b/bin/openob @@ -9,8 +9,27 @@ from openob.node import Node from openob.link_config import LinkConfig from openob.audio_interface import AudioInterface -parser = argparse.ArgumentParser(prog='openob', formatter_class=argparse.ArgumentDefaultsHelpFormatter) +class _HelpAction(argparse._HelpAction): + + def __call__(self, parser, namespace, values, option_string=None): + parser.print_help() + + subparsers_actions = [ + action for action in parser._actions + if isinstance(action, argparse._SubParsersAction)] + for subparsers_action in subparsers_actions: + for choice, subparser in subparsers_action.choices.items(): + print("Subparser '{}'".format(choice)) + print(subparser.format_help()) + + parser.exit() + + +parser = argparse.ArgumentParser(prog='openob', formatter_class=argparse.ArgumentDefaultsHelpFormatter, add_help=False) + parser.add_argument('-v', '--verbose', action='store_const', help='Increase logging verbosity', const=logging.DEBUG, default=logging.INFO) +parser.add_argument('-h', '--help', action=_HelpAction, help='Show help') + parser.add_argument('config_host', type=str, help="The configuration server for this OpenOB Node") parser.add_argument('node_name', type=str, help="The node name for this end") parser.add_argument('link_name', type=str, help="The link name this OpenOB Manager is operating on; must be the same on both Nodes") @@ -51,8 +70,8 @@ parser_rx_jack.add_argument('-jn', '--jack_name', type=str, default='openob', he parser_rx_jack.add_argument('-aj', '--jack_auto', action='store_false', help="Disable auto connection for JACK inputs") parser_rx.set_defaults(mode='rx') -opts = parser.parse_args() +opts = parser.parse_args() logger_factory = LoggerFactory(level=opts.verbose) link_config = LinkConfig(opts.link_name, opts.config_host)
The text was updated successfully, but these errors were encountered:
And a pull request: #37
Sorry, something went wrong.
#37 has been merged, so this has been solved?
No branches or pull requests
Openob does not show the help for the cli options for rx and tx mode.
Here is a patch:
whohoho@ef613ef
The text was updated successfully, but these errors were encountered: