[GRASS-dev] Re: R: [GRASS-user] List of commands available through GIS Manger (6.2/6.3)

Moritz Lennert mlennert at club.worldonline.be
Mon Mar 26 05:26:15 EDT 2007


On 24/03/07 01:48, Michael Barton wrote:
> This is a question of usability. I don't know which is best. When I first
> re-organized the menus, I wondered where to put "dabase" commands that dealt
> exclusively with attribute tables linked with vectors. I originally put
> under the vector heading those those that require you to specify a vector
> map and put those more general database commands under the database heading.
> 
> These have become a bit mixed up of late and the relatively new v.db.select
> has not yet been added.
> 
> So where do these commands make more sense?
> 
> The vector attribute ones under the vector heading? Or all under the
> database heading?


I have no opinion on that. Maybe all under the database heading might be 
the more logical...or have it under both as Mars suggests.

I think the more fundamental issue is to allow people to find under 
which menu and heading which commands are "hidden", thus making the move 
between CLI command names and GUI menu names easier.

This is what I aimed at with this script:

grep G_msg gui/tcltk/menus/menu.tcl | awk -F"\""
'{if(substr($2,1,1)=="&") {gsub("&","",$2);top=$2}  else {if($4=="")
second=$2; else print $4": "top"->"second"->"$2}}'

which gives for each command something like:

r.surf.fractal: Raster->Generate surfaces->Generate fractal surface

But it only works if you have three levels, if you have more levels it 
doesn't work, i.e.:

r.in.gdal: File->Import->Raster map->Multiple formats using GDAL

becomes

r.in.gdal: File->Raster map->Multiple formats using GDAL

Just a little bit more of awk (or other language) needed to solve this.

Moritz




More information about the grass-dev mailing list