Add Liberapay support

This commit is contained in:
Andrea Scarpino 2017-12-12 10:53:34 +01:00
parent 858b398927
commit 19a83b6219
9 changed files with 21 additions and 1 deletions

View File

@ -431,6 +431,7 @@ def make_v0(apps, apks, repodir, repodict, requestsdict, fdroid_signing_key_fing
addElementNonEmpty('bitcoin', app.Bitcoin, doc, apel)
addElementNonEmpty('litecoin', app.Litecoin, doc, apel)
addElementNonEmpty('flattr', app.FlattrID, doc, apel)
addElementNonEmpty('liberapay', app.LiberapayID, doc, apel)
# These elements actually refer to the current version (i.e. which
# one is recommended. They are historically mis-named, and need

View File

@ -135,6 +135,8 @@ regex_checks = {
'Donate': http_checks + [
(re.compile(r'.*flattr\.com'),
_("Flattr donation methods belong in the FlattrID flag")),
(re.compile(r'.*liberapay\.com'),
_("Liberapay donation methods belong in the LiberapayID flag")),
],
'Changelog': http_checks,
'Author Name': [

View File

@ -70,6 +70,7 @@ app_fields = set([
'Changelog',
'Donate',
'FlattrID',
'LiberapayID',
'Bitcoin',
'Litecoin',
'Name',
@ -120,6 +121,7 @@ class App(dict):
self.Changelog = ''
self.Donate = None
self.FlattrID = None
self.LiberapayID = None
self.Bitcoin = None
self.Litecoin = None
self.Name = None
@ -391,6 +393,10 @@ valuetypes = {
r'^[0-9a-z]+$',
['FlattrID']),
FieldValidator("Liberapay ID",
r'^[0-9]+$',
['LiberapayID']),
FieldValidator("HTTP link",
r'^http[s]?://',
["WebSite", "SourceCode", "IssueTracker", "Changelog", "Donate"]),
@ -1138,6 +1144,7 @@ def write_yaml(mf, app):
'Changelog',
'Donate',
'FlattrID',
'LiberapayID',
'Bitcoin',
'Litecoin',
'\n',
@ -1429,6 +1436,7 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build):
w_field_nonempty('Changelog')
w_field_nonempty('Donate')
w_field_nonempty('FlattrID')
w_field_nonempty('LiberapayID')
w_field_nonempty('Bitcoin')
w_field_nonempty('Litecoin')
mf.write('\n')

View File

@ -138,7 +138,7 @@ def update_wiki(apps, sortedids, apks):
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|license=%s|root=%s|author=%s|email=%s}}\n' % (
wikidata += '{{App|id=%s|name=%s|added=%s|lastupdated=%s|source=%s|tracker=%s|web=%s|changelog=%s|donate=%s|flattr=%s|liberapay=%s|bitcoin=%s|litecoin=%s|license=%s|root=%s|author=%s|email=%s}}\n' % (
appid,
app.Name,
app.added.strftime('%Y-%m-%d') if app.added else '',
@ -149,6 +149,7 @@ def update_wiki(apps, sortedids, apks):
app.Changelog,
app.Donate,
app.FlattrID,
app.LiberapayID,
app.Bitcoin,
app.Litecoin,
app.License,

View File

@ -586,6 +586,10 @@ msgstr ""
msgid "Flattr donation methods belong in the FlattrID flag"
msgstr ""
#: ../fdroidserver/lint.py
msgid "Liberapay donation methods belong in the LiberapayID flag"
msgstr ""
#: ../fdroidserver/build.py
msgid ""
"Force build of disabled apps, and carries on regardless of scan problems. "

View File

@ -17,6 +17,7 @@ Disabled: null
Donate: null
FlattrID: null
IssueTracker: https://github.com/miguelvps/PoliteDroid/issues
LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''

View File

@ -40,6 +40,7 @@ Disabled: null
Donate: http://sufficientlysecure.org/index.php/adaway
FlattrID: '369138'
IssueTracker: https://github.com/dschuermann/ad-away/issues
LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''

View File

@ -37,6 +37,7 @@ Disabled: null
Donate: null
FlattrID: null
IssueTracker: https://github.com/SMSSecure/SMSSecure/issues
LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''

View File

@ -24,6 +24,7 @@ Disabled: null
Donate: http://www.videolan.org/contribute.html#money
FlattrID: null
IssueTracker: http://www.videolan.org/support/index.html#bugs
LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: 'Instructions and dependencies here: http://wiki.videolan.org/AndroidCompile