mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
eliminate Boolean metadata type, only 'bool' is needed
No need for a specific metadata type for 'Requires Root'. Just use 'bool', then convert on output. This keeps the internal representation consistent since all boolean-ish values will be Python bools. This in turn makes parsing metadata in various formats easier. This also makes setting booleans more tolerant since all these values are valid: Yes yes No no True true False false
This commit is contained in:
parent
ab145de6bc
commit
014df8426f
2 changed files with 15 additions and 25 deletions
|
@ -95,6 +95,10 @@ def update_wiki(apps, sortedids, apks):
|
|||
if 'AntiFeatures' in app:
|
||||
for af in app['AntiFeatures']:
|
||||
wikidata += '{{AntiFeature|' + af + '}}\n'
|
||||
if app['Requires Root']:
|
||||
requiresroot = 'Yes'
|
||||
else:
|
||||
requiresroot = 'No'
|
||||
wikidata += '{{App|id=%s|name=%s|added=%s|lastupdated=%s|source=%s|tracker=%s|web=%s|changelog=%s|donate=%s|flattr=%s|bitcoin=%s|litecoin=%s|dogecoin=%s|license=%s|root=%s}}\n' % (
|
||||
appid,
|
||||
app['Name'],
|
||||
|
@ -110,7 +114,7 @@ def update_wiki(apps, sortedids, apks):
|
|||
app['Litecoin'],
|
||||
app['Dogecoin'],
|
||||
app['License'],
|
||||
app.get('Requires Root', 'No'))
|
||||
requiresroot)
|
||||
|
||||
if app['Provides']:
|
||||
wikidata += "This app provides: %s" % ', '.join(app['Summary'].split(','))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue