[GRASS-SVN] r53713 - grass/trunk/scripts/v.db.reconnect.all
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Nov 6 08:30:22 PST 2012
Author: martinl
Date: 2012-11-06 08:30:21 -0800 (Tue, 06 Nov 2012)
New Revision: 53713
Modified:
grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py
Log:
v.db.reconnect.all: count vector maps (sync with v.build.all)
Modified: grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py
===================================================================
--- grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py 2012-11-06 16:29:15 UTC (rev 53712)
+++ grass/trunk/scripts/v.db.reconnect.all/v.db.reconnect.all.py 2012-11-06 16:30:21 UTC (rev 53713)
@@ -120,11 +120,15 @@
mapset = grass.gisenv()['MAPSET']
- for vect in grass.list_grouped('vect')[mapset]:
+ vectors = grass.list_grouped('vect')[mapset]
+ num_vectors = len(vectors)
+
+ i = 0
+ for vect in vectors:
vect = "%s@%s" % (vect, mapset)
- grass.message('-' * 60)
- grass.message(_("Reconnecting vector map <%s>...") % vect)
- grass.message('-' * 60)
+ i += 1
+ grass.message(_("%s\nReconnecting vector map <%s> (%d of %d)...\n%s") % \
+ ('-' * 80, vect, i, num_vectors, '-' * 80))
for f in grass.vector_db(vect, stderr = nuldev).itervalues():
layer = f['layer']
schema_table = f['table']
More information about the grass-commit
mailing list