mail[Wesnoth-commits] r44220 - /trunk/data/tools/wmllint


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by esr on July 16, 2010 - 20:53:
Author: esr
Date: Fri Jul 16 20:53:13 2010
New Revision: 44220

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44220&view=rev
Log:
-p or --progress option for wmllint: - dumps filenames as it processes.

Modified:
    trunk/data/tools/wmllint

Modified: trunk/data/tools/wmllint
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wmllint?rev=44220&r1=44219&r2=44220&view=diff
==============================================================================
--- trunk/data/tools/wmllint (original)
+++ trunk/data/tools/wmllint Fri Jul 16 20:53:13 2010
@@ -2096,12 +2096,13 @@
 
 if __name__ == '__main__':
     try:
-        (options, arguments) = getopt.getopt(sys.argv[1:], "cdDfhnrsvSZ", [
+        (options, arguments) = getopt.getopt(sys.argv[1:], "cdDfhnprsvSZ", [
             "clean",
             "diffs",
             "dryrun",
             "future",
             "help",
+            "progress",
             "revert",
             "stripcr",
             "verbose",
@@ -2119,6 +2120,7 @@
     stripcr = False
     verbose = 0
     dospellcheck = True
+    progress = False 
     for (switch, val) in options:
         if switch in ('-h', '--help'):
             help()
@@ -2132,6 +2134,8 @@
             diffs = True
         elif switch in ('-f', '--future'):
             future = True
+        elif switch in ('-p', '--progress'):
+            progress = True
         elif switch in ('-r', '--revert'):
             revert = True
         elif switch in ('-s', '--stripcr'):
@@ -2222,6 +2226,8 @@
             for fn in allcfgfiles(dir):
                 if verbose >= 2:
                     print fn + ":"
+                if progress:
+                    print fn
                 backup = fn + "-bak"
                 if clean or revert:
                     # Do housekeeping




Related Messages


Powered by MHonArc, Updated Fri Jul 16 22:00:12 2010