[GRASS-dev] Re: g.rename consolidation
glynn at gclements.plus.com
Wed Feb 28 23:38:37 CET 2007
Maciej Sieczka wrote:
> Michael Barton wrote:
> > TclTk has a nice progress bar capabilities. But it needs consistent
> > information to read. There is a progress bar built into the map display that
> > tracks display progress. For modules that output consistent progress
> > information, there is the green progress bar in the autogenerated dialog.
> > The holes are for modules that don't output progress information in a
> > consistent format and for scripts that tend not to output it at all.
> Is it possible to make the script output progress info in way tcl/tk
> GRASS GUI could use it?
if [ "$GRASS_MESSAGE_FORMAT" = "gui" ] ; then
echo "GRASS_INFO_PERCENT: $percent" >&2
It could get tricky if the script calls modules which output their own
I suppose that the script *could* process the commands' stderr, parse
the percentages and re-emit them to its own stderr, scaled according
to the proportion of the task that the command represents. Although,
I'm not expecting to see many scripts actually taking that approach.
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev