chiark / gitweb /
Ability to tag apps with antifeatures, so they can be included if the user wants
authorCiaran Gultnieks <ciaran@ciarang.com>
Wed, 15 Dec 2010 21:28:50 +0000 (21:28 +0000)
committerCiaran Gultnieks <ciaran@ciarang.com>
Wed, 15 Dec 2010 21:28:50 +0000 (21:28 +0000)
metadata.py
metadata/com.drodin.tuxrider.txt
metadata/org.mailboxer.saymyname.txt
update.py

index 08a7c9b5bb041d604b505355b6414d8d53061021..a62f83605074a5b400da8519f8805bcdbeb9689e 100644 (file)
@@ -34,6 +34,7 @@ def read_metadata():
         thisinfo['source'] = ''
         thisinfo['tracker'] = ''
         thisinfo['disabled'] = None
+        thisinfo['antifeatures'] = None
         thisinfo['marketversion'] = ''
         thisinfo['marketvercode'] = '0'
         thisinfo['repotype'] = ''
@@ -67,6 +68,16 @@ def read_metadata():
                         thisinfo['tracker'] = value
                     elif field == 'Disabled':
                         thisinfo['disabled'] = value
+                    elif field == 'AntiFeatures':
+                        parts = value.split(",")
+                        for part in parts:
+                            if (part != "Ads" and
+                                part != "Tracking" and
+                                part != "NonFreeNet" and
+                                part != "NonFreeAdd"):
+                                print "Unrecognised antifeature '" + part + "'"
+                                sys.exit(1)
+                        thisinfo['antifeatures'] = value
                     elif field == 'Market Version':
                         thisinfo['marketversion'] = value
                     elif field == 'Market Version Code':
index 4c6aeeb501a77953716370a4146857ea35d0fa10..314bf98d890540ec9d91237f5adde524ecc85d30 100644 (file)
@@ -1,4 +1,5 @@
 Disabled:Ads
+AntiFeatures:Ads
 License:GPLv2+
 Web Site:http://tuxrider.drodin.com/
 Source Code:https://github.com/drodin/TuxRider
index 3f91caec744035dabb04c99bfe65b74fa498afd8..d6ff9dd73b036bf51b0bddd410e9aa14de8bf5cb 100644 (file)
@@ -1,4 +1,5 @@
 Disabled:Issues with a) Google Analytics usage tracking, b) ads, c) vague licensing
+AntiFeatures:Ads,Tracking
 License:GPLv2
 Web Site:http://tomtasche.at/p/SayMyName
 Source Code:http://github.com/TomTasche/SayMyName
index 2840f7a92d372f53a75565f0a0ba186a44be0ee2..15dc548dd5a046c5327bde8e95b0ac3a98fcded9 100644 (file)
--- a/update.py
+++ b/update.py
@@ -209,6 +209,8 @@ for app in apps:
         addElement('tracker', app['tracker'], doc, apel)
         addElement('marketversion', app['marketversion'], doc, apel)
         addElement('marketvercode', app['marketvercode'], doc, apel)
+        if not (app['antifeatures'] is None):
+            addElement('antifeatures', app['antifeatures'], doc, apel)
 
         gotmarketver = False