[GRASS5] SG3d and g.parser
glynn.clements at virgin.net
Wed Feb 19 16:21:00 EST 2003
John Gillette wrote:
> (2) Can someone give me an example of the usage of g.parser?
> I don't understand exactly how to use this command.
There is a sample script: src/general/g.parser/test.sh.
The general idea is:
1. Describe the module/options/flags by adding comments beginning with
"#%" to the start of the script. The field names match those in the
GModule, Option and Flag structs.
2. If the first argument isn't "@ARGS_PARSED@", invoke g.parser with
the script name and its arguments.
3. g.parser will parse the command line according to the comments from
step 1, then re-invoke the script with the value of each option/flag
stored in an environment variable called GIS_OPT_<option name> or
Glynn Clements <glynn.clements at virgin.net>
More information about the grass-dev