RE: [GRASS-user] FW: How to allow a file browser dialog in shells cripts

Thanks Hamish and Markus for the reference. Is there a way to have the file
loader dialog box open in a certain directory like $GISDBASE, for instance?

~ Eric.

-----Original Message-----
From: grassuser-bounces@grass.itc.it
To: grassuser@grass.itc.it
Sent: 6/22/2006 8:55 AM
Subject: Re: [GRASS-user] FW: How to allow a file browser dialog in
shellscripts

Hamish wrote on 06/22/2006 11:35 AM:

Eric wrote:

I'm trying to create a script to load plan ascii files as input. I'm
unfamiliar with all of the possible variations for the gisprompt
parameter structure. I want to allow the user to browse the Mapset to
load each ascii file.
   
add to the option definition:

#% gisprompt: old_file,file,input

e.g. m.proj.

While we're on the topic, can anyone explain why there are usually
several gisprompt parameters allowed for in most Grass shell scripts?
What do all these mean?
   
somewhere deep in the programmers' manual or lib/gis/parser.c ...

from memory:

old/new - whether to open map/file browser; checks that it won't

overwrite

element - the directory in $MAPSET, if applicable
prompt - mostly unused nowadays?

Here is the list:
http://mpa.itc.it/markus/grass61progman/
-> File List <http://mpa.itc.it/markus/grass61progman/files.html&gt;
   -> paerser.c

http://mpa.itc.it/markus/grass61progman/parser_8c-source.html#l00326

Markus

Markus

_______________________________________________
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser

Eric Patton wrote:

Thanks Hamish and Markus for the reference. Is there a way to have the
file loader dialog box open in a certain directory like $GISDBASE, for
instance?

It is just the pwd, cd to there in the script first. I don't know
how the parser will treat that though- it might cause problems.

#!/bin/sh
eval `g.gisenv | grep GISDBASE`
cd "$GISDBASE"

#% option

?
Hamish