|
@@ -9,9 +9,11 @@
|
|
|
|
|
|
<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
|
|
|
|
|
|
+
|
|
|
<h2>NAME</h2>
|
|
|
<em><b>g.parser</b></em>
|
|
|
|
|
|
+
|
|
|
<h2>DESCRIPTION</h2>
|
|
|
|
|
|
The <em>g.parser</em> module provides full parser support for GRASS
|
|
@@ -19,6 +21,7 @@ scripts, including an auto-generated GUI interface, help page
|
|
|
template, and command line option checking. In this way a simple
|
|
|
script can very quickly be made into a full-fledged GRASS module.
|
|
|
|
|
|
+
|
|
|
<h2>OPTIONS</h2>
|
|
|
|
|
|
After parsing the arguments are stored in environment variables for
|
|
@@ -52,6 +55,7 @@ Typical header definitions are as follows:
|
|
|
#%end
|
|
|
</pre></div>
|
|
|
|
|
|
+
|
|
|
<h2>NOTES</h2>
|
|
|
|
|
|
An option can be instructed to allow multiple inputs by adding the
|
|
@@ -95,6 +99,7 @@ were used, you should be checking <tt>GRASS_OVERWRITE</tt> and/or
|
|
|
script should behave the same way regardless of whether they were set
|
|
|
by --o, --q or --v being passed to the script or set by other means.
|
|
|
|
|
|
+
|
|
|
<h2>AUTOMATED SCRIPT CREATION</h2>
|
|
|
|
|
|
The flag <b>--script</b> added to a GRASS command, generates shell
|
|
@@ -106,24 +111,27 @@ to any GRASS command. Example:
|
|
|
v.in.db --script
|
|
|
</pre></div>
|
|
|
|
|
|
+
|
|
|
<h2>Help page template (HTML)</h2>
|
|
|
|
|
|
-The flag <b>--html-description</b> added to a GRASS command,
|
|
|
+The flag <b>--html-description</b> added to a GRASS command
|
|
|
generates a related help page template in HTML. Example:
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
v.in.db --html-description
|
|
|
</pre></div>
|
|
|
|
|
|
+
|
|
|
<h2>GUI window parser (XML)</h2>
|
|
|
|
|
|
-The flag <b>--interface-description</b> added to a GRASS command,
|
|
|
+The flag <b>--interface-description</b> added to a GRASS command
|
|
|
generates a related help page template in XML. Example:
|
|
|
|
|
|
<div class="code"><pre>
|
|
|
v.in.db --interface-description
|
|
|
</pre></div>
|
|
|
|
|
|
+
|
|
|
<h2>TRANSLATION</h2>
|
|
|
|
|
|
<em>g.parser</em> provides some support for translating the options of
|
|
@@ -138,6 +146,7 @@ g.parser -t somescriptfile
|
|
|
<tt>stdout</tt>, one per line, and exit. This is for internal use within
|
|
|
the build system to prepare GRASS scripts for translation.
|
|
|
|
|
|
+
|
|
|
<h2>EXAMPLES</h2>
|
|
|
|
|
|
<h3>Example code for SHELL</h3>
|
|
@@ -291,6 +300,7 @@ Parameters:
|
|
|
option1 An option
|
|
|
</pre></div>
|
|
|
|
|
|
+
|
|
|
<h3>Example code for Perl</h3>
|
|
|
|
|
|
<div class="code"><pre>
|
|
@@ -360,6 +370,10 @@ printf ("Value of GIS_OPT_vect: '%s'\n", $ENV{'GIS_OPT_VECTOR'});
|
|
|
|
|
|
</pre></div>
|
|
|
|
|
|
+The <tt>test.pl</tt> script will provide a GUI and usage help text similar
|
|
|
+to the other examples above.
|
|
|
+
|
|
|
+
|
|
|
<h2>SEE ALSO</h2>
|
|
|
|
|
|
<em>
|
|
@@ -370,6 +384,7 @@ printf ("Value of GIS_OPT_vect: '%s'\n", $ENV{'GIS_OPT_VECTOR'});
|
|
|
|
|
|
and the <tt>SUBMITTING_SCRIPTS</tt> file in the GRASS source code.
|
|
|
|
|
|
+
|
|
|
<h2>AUTHOR</h2>
|
|
|
|
|
|
Glynn Clements
|