Skip to content

Needs "help" functions, such as "-list-boards" #78

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

Open
mralexgray opened this issue Dec 4, 2015 · 4 comments
Open

Needs "help" functions, such as "-list-boards" #78

mralexgray opened this issue Dec 4, 2015 · 4 comments
Labels
type: enhancement Proposed improvement

Comments

@mralexgray
Copy link

Great work on this essential, much needed tool. So far, it is a bit unfriendly. A smart person should theoretically be able to use this without scouring the web. There does not seem to be a man page, and entering --help nets the same result as having entered nothing.. or nonsense, lol.

The output should stick to convention, provide help, and utility options...

Usage: 
     arduino_builder -hardware ... -tools ... -fqbn ...  [options]
     arduino_builder -list-boards [-hardware ...] [-tools ...]  # lists available board, per the current config
     arduino_builder -help # show this text
     etc....

Please refer Wikipedia's "Usage_message", if I am at all unclear.

You'll notice I mentioned a non-existent parameter, -list-boards. This type of option should be able to run, with our without "options", to help the user when formulating their own command-line.. so they don't have to resort to searching the web.. or worse yet.. your source code, like I did. (I don't know what my board's FQBN is! And I'm sure I am not the only one.)

--dump-prefs is another example of a command trhat should be allowed to be run "on its own", independent of a compile, or what not.

I could go on... and will, if there is a willingness to proceed.

@ffissore
Copy link
Contributor

ffissore commented Dec 9, 2015

arduino-builder knows nothing about where you put your boards and libraries. Therefore, running with your proposed --list-boards, without any additional argument, will print nothing. You would have to provide at least one --hardware param.
If that still makes sense to you, I can easily code such --list-boards

@mralexgray
Copy link
Author

that would be great.. also, one complete, valid usage example would be nice in the readme/onscreen help. or better yet, an example of what a good -build-options-file might look like..

@vshymanskyy
Copy link

so.. no --list-boards yet? ;)

@roncapat
Copy link

roncapat commented Jan 4, 2017

I'm probably going to submit a pull request for something like:

Usage: 
     arduino_builder -hardware ... -tools ... -fqbn ...  [options]
     arduino_builder -help # show this text

--list-boards, as pointed out by @ffissore, is a more complex flag to add, which depends on the context, and is not directly related to the need of a better "Usage header". That could be done in future by someone.
Suggestions on the usage intro, as quoted above?

EDIT:
see pull request #201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

6 participants