Closed Speenah closed 3 weeks ago
Sure! Would that be to edit the help
argument on the printCommand.add_argument
? I'm looking at the docs for choices and I'm not seeing a way to specify a description for each choice
Yes, sadly there is no other option than editing the global help.
The parser already have the RawTextHelpFormatter
formatter class, so you should be able to use \n
to create new lines.
With c08e559 the output looks like this
positional arguments:
{current,list,speed} current - The current strategy
list - List available strategies
speed - The current fan speed percentage
Adds an option to print the current fan speed percentage:
Turns out adding the percentage was pretty trivial since the
FanController
holds this state. Printing the current RPM is slightly more complex since it needs to be retrieved from the hardware controller, and can be ambiguous on how to handle the case of multiple fans. But just getting the percentage satisfies my original use caseCloses #74