[GRASS-SVN] r58320 - grass/branches/develbranch_6/general/g.parser

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Nov 27 13:00:30 PST 2013


Author: neteler
Date: 2013-11-27 13:00:30 -0800 (Wed, 27 Nov 2013)
New Revision: 58320

Added:
   grass/branches/develbranch_6/general/g.parser/g_parser_test.png
Modified:
   grass/branches/develbranch_6/general/g.parser/
   grass/branches/develbranch_6/general/g.parser/Makefile
   grass/branches/develbranch_6/general/g.parser/description.html
Log:
g.parser manual: GUI window screenshot added to example


Property changes on: grass/branches/develbranch_6/general/g.parser
___________________________________________________________________
Modified: svn:ignore
   - *.tmp.html
*OBJ*

   + OBJ.*
*.tmp.html


Modified: grass/branches/develbranch_6/general/g.parser/Makefile
===================================================================
--- grass/branches/develbranch_6/general/g.parser/Makefile	2013-11-27 20:59:34 UTC (rev 58319)
+++ grass/branches/develbranch_6/general/g.parser/Makefile	2013-11-27 21:00:30 UTC (rev 58320)
@@ -8,6 +8,7 @@
 include $(MODULE_TOPDIR)/include/Make/Module.make
 
 default: cmd
+	$(INSTALL_DATA) g_parser_test.png $(HTMLDIR)/g_parser_test.png
 
 #FIXME: please comment or file bug reports instead of just quietly
 #  bypassing portability problems with a ifneq(). otherwise underlying

Modified: grass/branches/develbranch_6/general/g.parser/description.html
===================================================================
--- grass/branches/develbranch_6/general/g.parser/description.html	2013-11-27 20:59:34 UTC (rev 58319)
+++ grass/branches/develbranch_6/general/g.parser/description.html	2013-11-27 21:00:30 UTC (rev 58320)
@@ -12,6 +12,18 @@
 <h2>NAME</h2>
 <em><b>g.parser</b></em>
 
+<h2>SYNOPSIS</h2>
+<b>g.parser help</b><br>
+<b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
+
+<h3>Flags:</h3>
+<dl>
+<dt><b>-t</b></dt>
+<dd>Print strings for translation</dd>
+<dt><b>-s</b></dt>
+<dd>Write option values to stdout instead of reinvoking script</dd>
+</dl>
+
 <h2>DESCRIPTION</h2>
 
 The <em>g.parser</em> module provides full parser support for GRASS
@@ -48,33 +60,21 @@
 
 <div class="code"><pre>
 #%module
-#%  description: g.parser test script   
+#% description: g.parser test script   
 #%end
 #%flag
-#%  key: f
-#%  description: A flag
+#% key: f
+#% description: A flag
 #%end
 #%option
-#%  key: raster
-#%  type: string
-#%  gisprompt: old,cell,raster
-#%  description: Raster input map
-#%  required : yes
+#% key: raster
+#% type: string
+#% gisprompt: old,cell,raster
+#% description: Raster input map
+#% required : yes
 #%end
 </pre></div>
 
-<h2>SYNOPSIS</h2>
-<b>g.parser help</b><br>
-<b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
-
-<h3>Flags:</h3>
-<dl>
-<dt><b>-t</b></DT>
-<dd>Print strings for translation</DD>
-<dt><b>-s</b></DT>
-<dd>Write option values to stdout instead of reinvoking script</DD>
-</dl>
-
 <h2>NOTES</h2>
 
 An option can be instructed to allow multiple inputs by adding the
@@ -176,6 +176,12 @@
 
 <h2>EXAMPLES</h2>
 
+All examples below autogenerate the graphical user interface when invoked
+without parameters of flags:
+
+<p>
+<img src="g_parser_test.png" alt="Autogenerated GUI window">
+
 <h3>Example code for SHELL</h3>
 
 <div class="code"><pre>
@@ -239,7 +245,32 @@
 
 </pre></div>
 
+To run properly, the script needs to be copied into $GISBASE/scripts/
+with the executable flag being set. The script will provide a GUI
+(as above) and the following usage help text:
 
+<div class="code"><pre>
+test.sh --help
+
+Description:
+ g.parser test script (python)
+
+Usage:
+ test.sh [-f] raster=string vector=string [option1=string]
+   [--verbose] [--quiet]
+
+Flags:
+  -f   A flag
+ --v   Verbose module output
+ --q   Quiet module output
+
+Parameters:
+   raster   Raster input map
+   vector   Vector input map
+  option1   An option
+</pre></div>
+
+
 <h3>Example code for Python</h3>
 
 <div class="code"><pre>
@@ -308,7 +339,8 @@
     main()
 </pre></div>
 
-The <tt>test.py</tt> script will provide following help text:
+The <tt>test.py</tt> script will provide a GUI (as above) and the
+following usage help text:
 
 <div class="code"><pre>
 ./test.py --help
@@ -413,7 +445,7 @@
   <a href="g.ask.html">g.ask</a>,
   <a href="g.filename.html">g.filename</a>,
   <a href="g.findfile.html">g.findfile</a>,
-  <a href="g.tempfile.html">g.tempfile</a>,
+  <a href="g.tempfile.html">g.tempfile</a>
 </em>
 
 and the <tt>SUBMITTING_SCRIPTS</tt> file in the GRASS source code.

Added: grass/branches/develbranch_6/general/g.parser/g_parser_test.png
===================================================================
(Binary files differ)


Property changes on: grass/branches/develbranch_6/general/g.parser/g_parser_test.png
___________________________________________________________________
Added: svn:mime-type
   + image/png



More information about the grass-commit mailing list