[GRASS-SVN] r73724 - grass/trunk/scripts/v.report
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Nov 29 08:03:27 PST 2018
Author: lucadelu
Date: 2018-11-29 08:03:27 -0800 (Thu, 29 Nov 2018)
New Revision: 73724
Modified:
grass/trunk/scripts/v.report/v.report.py
Log:
v.report: added c flag to avoid column names in output
Modified: grass/trunk/scripts/v.report/v.report.py
===================================================================
--- grass/trunk/scripts/v.report/v.report.py 2018-11-29 15:08:36 UTC (rev 73723)
+++ grass/trunk/scripts/v.report/v.report.py 2018-11-29 16:03:27 UTC (rev 73724)
@@ -42,6 +42,10 @@
#% options: asc,desc
#% descriptions: asc;Sort in ascending order;desc;Sort in descending order
#%end
+#%flag
+#% key: c
+#% description: Do not include column names in output
+#%end
import sys
import os
@@ -174,7 +178,8 @@
records3.sort()
# print table header
- sys.stdout.write('|'.join(colnames + extracolnames) + '\n')
+ if not flags['c']:
+ sys.stdout.write('|'.join(colnames + extracolnames) + '\n')
# make and print the table:
numcols = len(colnames) + len(extracolnames)
More information about the grass-commit
mailing list