[GRASS-dev] Re: [GRASSGUI] changing data for parser

Daniel Calvelo dca.gis at gmail.com
Thu Mar 22 02:42:18 EDT 2007


Hi all,

I've added guisection output to the XML generation in parser.c. While
looking for other weirdnesses in the different output formats, I came
across ->descriptions. So far, only --script makes use of them, and
I've grepped through vector/ raster/ and scripts/ and found that only
the following use it:

v.category
v.clean
v.drape
v.to.db
r.colors

For completeness sake, I would add ->descriptions handling in all of
HTML (where I think it is the most useful), tcltk and xml output, but
I wonder... Is there any chance of ->descriptions being more used?
Maybe add something in SUBMITTING and SUBMITTING_SCRIPTS?

Thoughts?

Daniel.

On 3/22/07, Michael Barton <michael.barton at asu.edu> wrote:
> If you go that route, compare the results of --interface-description and
> --tcltk to see what else is missing from the xml generator.
>
> I had rendering working great and now it is not. It is not compsiting
> properly. I might do a restart to see if it is random. But please check if
> you could.
>
> Cheers
> Michael
>
>
> On 3/21/07 11:19 PM, "Daniel Calvelo" <dca.gis at gmail.com> wrote:
>
> > Mmmmm... I'd rather fix the XML generator in parser.c and Jan's DTD to
> > take care of guisection. I'm on it.
> >
> > Daniel.
> >
> > On 3/22/07, Michael Barton <michael.barton at asu.edu> wrote:
> >>
> >>  menuform.py uses the xml text generated by "<command>
> >> ‹interface-description" to create the autogenerated dialogs. This dates to
> >> 2001.
> >>
> >>  I was just reminded in a recent post to the grass developer list that there
> >> is a richer interface description output called by "<command> --tcltk". This
> >> has been developed over the past year or so. I give an example below (part
> >> of the output from "d.vect ‹tcltk"). We might want to consider switching the
> >> autogenerated panels to be created by the ‹tcltk code.
> >>
> >>  Besides being a richer set of descriptions (includes prompt for notebook
> >> tabs and color picking dialogs), it looks easier to parse than the
> >> ‹interface description xml. It would also mean that we would not need sax.
> >>
> >>  Michael
> >>
> >>  =======  --tcltk style interface description ==========
> >>
> >>  GRASS 6.3.cvs (spearfish60_test):~ > d.vect --tcltk
> >>  begin_dialog {d.vect} {
> >>   label {}
> >>   desc {Displays GRASS vector data in the active frame on the graphics
> >> monitor.}
> >>   key {display}
> >>  }
> >>  add_flag 1 {
> >>   name {v}
> >>   desc {Run verbosely}
> >>   answer 0
> >>   label {}
> >>   guisection {}
> >>  }
> >>  add_flag 2 {
> >>   name {a}
> >>   desc {Get colors from map table column (of form RRR:GGG:BBB)}
> >>   answer 0
> >>   label {}
> >>   guisection {Colors}
> >>  }
> >>  add_flag 3 {
> >>   name {c}
> >>   desc {Random colors according to category number (or layer number if
> >> 'layer=-1' is given)}
> >>   answer 0
> >>   label {}
> >>   guisection {Colors}
> >>  }
> >>  add_flag 4 {
> >>   name {i}
> >>   desc {Use values from 'cats' option as line ID}
> >>   answer 0
> >>   label {}
> >>   guisection {Query}
> >>  }
> >>  add_flag 5 {
> >>   name {x}
> >>   desc {Don't add to list of vectors and commands in monitor (it won't be
> >> drawn if the monitor is refreshed)}
> >>   answer 0
> >>   label {}
> >>   guisection {}
> >>  }
> >>  add_option 6 {
> >>   name {map}
> >>   type {name}
> >>   multi 0
> >>   desc {Name of input vector map}
> >>   required 1
> >>   options {}
> >>   answer {}
> >>   prompt {old,vector,vector}
> >>   label {}
> >>   guisection {}
> >>  }
> >>  add_option 7 {
> >>   name {type}
> >>   type {string}
> >>   multi 1
> >>   desc {Feature type(s)}
> >>   required 0
> >>   options {point,line,boundary,centroid,area,face}
> >>   answer {point,line,boundary,centroid,area,face}
> >>   prompt {}
> >>   label {Type}
> >>   guisection {}
> >>  }
> >>
> >>  __________________________________________
> >>  Michael Barton, Professor of Anthropology
> >>  School of Human Evolution & Social Change
> >>  Center for Social Dynamics & Complexity
> >>  Arizona State University
> >>
> >>  phone: 480-965-6213
> >>  fax: 480-965-7671
> >>  www: http://www.public.asu.edu/~cmbarton
> >>
> >>
> >> _______________________________________________
> >> grassgui mailing list
> >> grassgui at grass.itc.it
> >> http://grass.itc.it/mailman/listinfo/grassgui
> >>
> >>
> >
>
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics & Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
>
>


-- 
-- Daniel Calvelo Aros




More information about the grass-dev mailing list