Changeset 58319


Ignore:
Timestamp:
Nov 27, 2013, 12:59:34 PM (11 years ago)
Author:
neteler
Message:

g.parser manual: GUI window screenshot added to example

Location:
grass/branches/releasebranch_6_4/general/g.parser
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • grass/branches/releasebranch_6_4/general/g.parser

    • Property svn:ignore
      •  

        old new  
         1OBJ.*
        12*.tmp.html
        2 *OBJ*
  • grass/branches/releasebranch_6_4/general/g.parser/Makefile

    r45515 r58319  
    99
    1010default: cmd
     11        $(INSTALL_DATA) g_parser_test.png $(HTMLDIR)/g_parser_test.png
    1112
    12 #hardcoded here, this is an exeption due to the g.parser specialities:
     13#FIXME: please comment or file bug reports instead of just quietly
     14#  bypassing portability problems with a ifneq(). otherwise underlying
     15#  problems never get fixed. thanks
    1316ifneq ($(MSYSTEM),MINGW32)
     17
     18# hardcoded here, this is an exeption due to the g.parser specialities:
    1419htmlcmd:
    1520        $(MAKE) $(HTMLDIR)/$(PGM).html HTMLSRC=
     21
    1622endif
  • grass/branches/releasebranch_6_4/general/g.parser/description.html

    r55069 r58319  
    1313<em><b>g.parser</b></em>
    1414
     15<h2>SYNOPSIS</h2>
     16<b>g.parser help</b><br>
     17<b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
     18
     19<h3>Flags:</h3>
     20<dl>
     21<dt><b>-t</b></dt>
     22<dd>Print strings for translation</dd>
     23<dt><b>-s</b></dt>
     24<dd>Write option values to stdout instead of reinvoking script</dd>
     25</dl>
     26
    1527<h2>DESCRIPTION</h2>
    1628
     
    4961<div class="code"><pre>
    5062#%module
    51 #%  description: g.parser test script   
     63#% description: g.parser test script   
    5264#%end
    5365#%flag
    54 #%  key: f
    55 #%  description: A flag
    56 #%end
    57 #%option
    58 #%  key: raster
    59 #%  type: string
    60 #%  gisprompt: old,cell,raster
    61 #%  description: Raster input map
    62 #%  required : yes
    63 #%end
    64 </pre></div>
    65 
    66 <h2>SYNOPSIS</h2>
    67 <b>g.parser help</b><br>
    68 <b>g.parser</b> [-<b>s</b>] [-<b>t</b>] <em>filename</em> [<em>argument</em>,...]
    69 
    70 <h3>Flags:</h3>
    71 <dl>
    72 <dt><b>-t</b></DT>
    73 <dd>Print strings for translation</DD>
    74 <dt><b>-s</b></DT>
    75 <dd>Write option values to stdout instead of reinvoking script</DD>
    76 </dl>
     66#% key: f
     67#% description: A flag
     68#%end
     69#%option
     70#% key: raster
     71#% type: string
     72#% gisprompt: old,cell,raster
     73#% description: Raster input map
     74#% required : yes
     75#%end
     76</pre></div>
    7777
    7878<h2>NOTES</h2>
     
    177177<h2>EXAMPLES</h2>
    178178
     179All examples below autogenerate the graphical user interface when invoked
     180without parameters of flags:
     181
     182<p>
     183<img src="g_parser_test.png" alt="Autogenerated GUI window">
     184
    179185<h3>Example code for SHELL</h3>
    180186
     
    238244echo "Value of GIS_OPT_VECTOR: '$GIS_OPT_VECTOR'"
    239245
     246</pre></div>
     247
     248To run properly, the script needs to be copied into $GISBASE/scripts/
     249with the executable flag being set. The script will provide a GUI
     250(as above) and the following usage help text:
     251
     252<div class="code"><pre>
     253test.sh --help
     254
     255Description:
     256 g.parser test script (python)
     257
     258Usage:
     259 test.sh [-f] raster=string vector=string [option1=string]
     260   [--verbose] [--quiet]
     261
     262Flags:
     263  -f   A flag
     264 --v   Verbose module output
     265 --q   Quiet module output
     266
     267Parameters:
     268   raster   Raster input map
     269   vector   Vector input map
     270  option1   An option
    240271</pre></div>
    241272
     
    309340</pre></div>
    310341
    311 The <tt>test.py</tt> script will provide following help text:
     342The <tt>test.py</tt> script will provide a GUI (as above) and the
     343following usage help text:
    312344
    313345<div class="code"><pre>
     
    414446  <a href="g.filename.html">g.filename</a>,
    415447  <a href="g.findfile.html">g.findfile</a>,
    416   <a href="g.tempfile.html">g.tempfile</a>,
     448  <a href="g.tempfile.html">g.tempfile</a>
    417449</em>
    418450
Note: See TracChangeset for help on using the changeset viewer.