Mechanism to build in command line help into the flowgraph?

I have testers that might not see the graphical version of the flowgraph
they are testing. To them, they run the flowgraph on the command line,
passing in various parameter values using the Short IDs set up in the
original flowgraph and built by GRC for the target.

Is there a way, for example, to pass in “-h” or similar and the
flowgraph spits out help text documentation and exits?

I would want this to be created without manually changing the files that
GRC produces when it builds the flowgraph.

Thanks in advance,
Tim Monahan-Mitchell

On 06/03/2013 12:26 PM, Monahan-Mitchell, Tim wrote:

See the parameter block in GRC

-josh

that GRC produces when it builds the flowgraph.
See the parameter block in GRC

-josh

I’m sorry, Josh, I’m missing how to do this.

Here is another way to describe an example of this.
Run my flowgraph, asking for help on its parameters and stop:

$ ./my_flowgraph.py -h
Usage: my_flowgraph.py [aeiouh]

-a : This is what the a option is all about
-e: This is what the e option does
(etc.)
-h: Display this text and exit

The above text would be entered someplace on the flowgraph in GRC, like
maybe the description field in the Options block. Then output of that
text to stdout is triggered by a selectable Short ID from a parameter
block on the flowgraph, or maybe is always hard coded to an option like
“–help”?

The above text would be entered someplace on the flowgraph in GRC,
like maybe the description field in the Options block. Then output of
that text to stdout is triggered by a selectable Short ID from a
parameter block on the flowgraph, or maybe is always hard coded to an
option like “–help”?

So you should get the --help for free when the flow graph is generated.
I think whats missing for your case is that the parameter block doesnt
have a entry field for a custom help message per parameter.

I would add a help entry field for the parameter.xml block and the
support in the flowgraph.tmpl for the help message. Right now the help
message is autogenerated I think to just say something generic/

-josh

The above text would be entered someplace on the flowgraph in GRC,
like maybe the description field in the Options block. Then output of
that text to stdout is triggered by a selectable Short ID from a
parameter block on the flowgraph, or maybe is always hard coded to an
option like “–help”?

So you should get the --help for free when the flow graph is generated.

Thanks, I didn’t know that. I tried it, it does tell you a list of the
parameters and types.

I think whats missing for your case is that the parameter block doesnt have a
entry field for a custom help message per parameter.

I would add a help entry field for the parameter.xml block and the support in
the flowgraph.tmpl for the help message. Right now the help message is
autogenerated I think to just say something generic/

Thanks - perhaps for a rainy day!

  • Tim