mail[Wesnoth-commits] r33386 - /trunk/data/tools/wesnoth_addon_manager


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

Header


Content

Posted by elias on March 07, 2009 - 16:25:
Author: elias
Date: Sat Mar  7 16:25:20 2009
New Revision: 33386

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33386&view=rev
Log:
Added --type options to wesnoth_addon_manager, so you can download all addons 
matching a certain type.

Modified:
    trunk/data/tools/wesnoth_addon_manager

Modified: trunk/data/tools/wesnoth_addon_manager
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/tools/wesnoth_addon_manager?rev=33386&r1=33385&r2=33386&view=diff
==============================================================================
--- trunk/data/tools/wesnoth_addon_manager (original)
+++ trunk/data/tools/wesnoth_addon_manager Sat Mar  7 16:25:20 2009
@@ -51,6 +51,8 @@
         "name may be a Python regexp matched against all add-on names " +
         "(specify the path where to put it with -c, " +
         "current directory will be used by default)")
+    optionparser.add_option("-T", "--type",
+        help = "Type of addons to download, e.g. 'era' or 'campaign'.")
     optionparser.add_option("-t", "--tar",
         help = "When used together with --download, create tarballs of any " 
+
         "downloaded addons and put into the specified directory.")
@@ -211,12 +213,13 @@
             campaigns = data.get_or_create_sub("campaigns")
             for campaign in campaigns.get_all("campaign"):
                 name = campaign.get_text_val("name", "?")
+                type = campaign.get_text_val("type", "")
                 version = campaign.get_text_val("version", "")
                 uploads = campaign.get_text_val("uploads", "")
                 if re.escape(options.download).replace("\\_", "_") == 
options.download:
                     if name == options.download:
                         fetchlist.append((name, version, uploads))
-                else:
+                elif options.type and options.type == type:
                     if re.search(options.download, name):
                         fetchlist.append((name, version, uploads))
 




Related Messages


Powered by MHonArc, Updated Sat Mar 07 17:00:34 2009