[GRASS5] More scripts updated for GRASS 5.7

Michael Barton michael.barton at asu.edu
Wed Apr 14 12:40:31 EDT 2004


Thanks for the encouragement Markus.

To make these scripts 5.7 ready, what is mainly needed is to make sure 
they have command line options (as opposed to being interactive) and to 
add the tcltk dialog support to the header.

Given this, it seems to make more sense to simply use these scripts in 
5.3 and slightly rewrite the 5.3 GUI to recognize this. The only thing 
that is missing is a usage statement when you type -h from the command 
line. g.parser generates this automatically in 5.7 but not in 5.3. 
However, doesn't seem to like it if I script it (as has been done 
previously). I'll mess around a bit with finding a way to generate a 
usage statement that works for both systems, modify the 5.3 GUI 
appropriately, and I think we can use the same scripts in both. You can 
link either way that way (5.3 to 5.7 or 5.7 to 5.3), which ever works 
best for you.

That said, I have a thought about a new protocol for scripts for GRASS 
6 that I wanted to run by you.

1. All scripts integral to GRASS (e.g., d.m) should go in $GISBASE/etc 
or be transformed into C++ modules.

2. All other scripts would be considered optional 'user scripts' and 
installed at run time from whatever is in the $GISBASE/scripts 
directory.

3. All user scripts must have a header for an autogenerating tcltk 
dialog (or something equivalent for an alternative GUI standard) as 
now, but with an additional 'menu' section. the menu section has a line 
to indicate where in the menu hierarchy the script will install and a 
line indicating what its menu name will be. [Alternatively, all scripts 
could go under a separate 'user script' menu item].

4. At run-time, GRASS would read the files in the $GISBASE/scripts 
directory and automatically install them into the menu, based on their 
headers. Scripts with incorrect menus will simply not load into the 
menu and not generate an error message (although they could be callable 
from the command line if they work otherwise).

This pretty much a 'plug-in' protocol. If such a protocol could be 
developed and promulgated, there could be a script download repository 
for all scripts and they would no longer be distributed with the base 
GRASS distribution. They would be user installable options, and people 
would be encouraged to submit scripts to the repository. This is kind 
of like the ImageJ model

What do you think?

Michael

On Wednesday, April 14, 2004, at 07:19  AM, Markus Neteler wrote:

> Michael,
>
> thanks for your efforts!
>
> May I suggest that we update most scripts in 5.3 and
> simply link into 5.7? To have two versions increases
> the workload.
>
> If you find someone to update 5.3 scripts with your
> versions, I'll link the stuff properly into 5.7.
>
> Only if they really differ we'll have to maintain two
> scripts (5.3/5.7).
>
> Markus
>
______________________________
Michael Barton, Professor & Curator
Department of Anthropology
Arizona State University
Tempe, AZ  85287-2402
USA

voice: 480-965-6262; fax: 480-965-7671


____________________
C. Michael Barton, Professor
Department of Anthropology
PO Box 872402
Arizona State University
Tempe, AZ  85287-2402
USA

Phone: 480-965-6262
Fax: 480-965-7671




More information about the grass-dev mailing list