chiark / gitweb /
Use app categories as wiki categories
authorCiaran Gultnieks <ciaran@ciarang.com>
Tue, 7 Jan 2014 13:39:48 +0000 (13:39 +0000)
committerDaniel Martí <mvdan@mvdan.cc>
Thu, 9 Jan 2014 15:23:49 +0000 (16:23 +0100)
fdroidserver/update.py

index 45d6ae5068aff56dc23492efbc57085649265974..e08f397a4c5c01ec6650219fc368019705be54d1 100644 (file)
@@ -187,6 +187,8 @@ def update_wiki(apps, apks):
             wikidata += '\n[[Category:Apps that are disabled]]\n'
         if app['Update Check Mode'] == 'None' and not app['Disabled']:
             wikidata += '\n[[Category:Apps with no update check]]\n'
+        for appcat in [c.strip() for c in app['Categories'].split(',')]:
+            wikidata += '\n[[Category:{0}]]\n'.format(appcat)
 
         # We can't have underscores in the page name, even if they're in
         # the package ID, because MediaWiki messes with them...