[GRASS-dev] table with the parser standard options

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 1 02:58:36 PDT 2015


On 01/07/15 06:42, Pietro wrote:
> Dear devs,
>
> I was not able to find a table in the GRASS manual pages with a
> summary of all the default options as define in
> parser_standard_options.c (lib/gis/parser_standard_options.c).

There is 
http://grass.osgeo.org/programming7/parser__standard__options_8c.html#a1a5da9db1229a9bbc59d16ae84540bb8

which is referenced from the g.parser man page.

But I agree that a table like your's might be more helpful and that it 
should be accessible amongst the man pages.


> Therefore I wrote a python command line tool to extract them from the
> source and print/write to a file in CSV/HTML format.

Great, thanks !

May I just suggest the following small modification to make the html 
more readable:

--- options_orig.py	2015-07-01 11:57:54.146435072 +0200
+++ options.py	2015-07-01 11:57:30.234718383 +0200
@@ -105,7 +105,7 @@

      def html(self, endline='\n', indent='  '):
          """Return a HTML table with the options"""
-        html = ["<table>"]
+        html = ["<table border=1>"]
          # write headers
          html.append(indent + "<tr>")
          html.append(indent * 2 + "<td>{0}</td>".format('option'))


> I believe we should add the generated table somewhere in the manual docs.
> Should I add this python script to grass_addons/tools?
>

Wouldn't it be better in tools/ directly in the source code ?

Moritz




More information about the grass-dev mailing list