arduino-builder icon indicating copy to clipboard operation
arduino-builder copied to clipboard

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

Open mralexgray opened this issue 8 years ago • 4 comments

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.

mralexgray avatar Dec 04 '15 21:12 mralexgray

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

ffissore avatar Dec 09 '15 09:12 ffissore

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..

mralexgray avatar Dec 20 '15 08:12 mralexgray

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

vshymanskyy avatar Nov 19 '16 00:11 vshymanskyy

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.

roncapat avatar Jan 04 '17 11:01 roncapat