mail[Wesnoth-commits] r33422 - /trunk/utils/wiki_grabber.py


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

Header


Content

Posted by koraq on March 08, 2009 - 14:12:
Author: mordante
Date: Sun Mar  8 14:12:58 2009
New Revision: 33422

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33422&view=rev
Log:
Cleanup the output of the container table.

Modified:
    trunk/utils/wiki_grabber.py

Modified: trunk/utils/wiki_grabber.py
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/utils/wiki_grabber.py?rev=33422&r1=33421&r2=33422&view=diff
==============================================================================
--- trunk/utils/wiki_grabber.py (original)
+++ trunk/utils/wiki_grabber.py Sun Mar  8 14:12:58 2009
@@ -273,25 +273,26 @@
             return "Empty table."
 
         result = '{| border="1"'
-        result += "\n!mandatory\n!id\n!type\n!return value\n!description\n"
-        for i in range(len(res)):
-            result += "|-\n"
+        result += "\n!ID (return value)\n!Type\n!Mandatory\n!Description\n"
+        for i in range(len(res)):
+            result += "|-\n"
+            if(res[i][1] == ""):
+                result += "|"
+            else:
+                result += "| " + res[i][1] + " "
+
+            if(res[i][3] == ""):
+                result += "\n"
+            else:
+                result += "(" + res[i][3] + ")\n"
+
+            result += "| " + res[i][2] + "\n"
+
             if(res[i][0] == ""):
                 result += "|no\n"
             else:
                 result += "|yes\n"
 
-            if(res[i][1] == ""):
-                result += "|not used\n"
-            else:
-                result += "| " + res[i][1] + "\n"
-
-            result += "| " + res[i][2] + "\n"
-
-            if(res[i][3] == ""):
-                result += "|none\n"
-            else:
-                result += "| " + res[i][3] + "\n"
             result += "| " + re.sub(r'@\*', "\n*", res[i][4]) + "\n"
         result += "|}"
 




Related Messages


Powered by MHonArc, Updated Sun Mar 08 14:20:31 2009