trustcrypto / python-onlykey

The OnlyKey Python Command-Line Utility is a command line tool targeted towards more advanced users. This can be used for configuration and testing.
https://docs.crp.to/command-line.html
47 stars 22 forks source link

Adding --help for better user experience #40

Open ranfdev opened 3 years ago

ranfdev commented 3 years ago

Currently there isn't any way to see the available commands. I can't do onlykey --help.

The python module argparse (which I think is included by default in python), can simplify argument parsing and adds a nicer user experience, by automatically creating an help section.

Are you interested in adding an --help flag? Can i do a pull request introducing argparse and adding the --help flag?

https://docs.python.org/3/library/argparse.html

onlykey commented 3 years ago

@ranfdev The --help flag was added here https://github.com/trustcrypto/python-onlykey/blob/bb7f9d3ac76b8bca1a3e0546b20a1d1820eee2b0/onlykey/cli.py#L334

but right now its only printing this:

See available command options here https://docs.crp.to/command-line.html

So you still have to go to the docs to see command options

altsalt commented 3 years ago

@ranfdev seems to have put in the initial effort to resolve this. May I ask what is still needed? Being able to query the commands without having a browser open would be appreciated.

onlykey commented 3 years ago

Currently, in order to ensure the most up-to-date command options we have those available in our docs at the link provided. The PR for argparse had some issues working with some of the commands so that remains open until we are able to resolve argparse issues.