chiark / gitweb /
Add Liberapay support
authorAndrea Scarpino <me@andreascarpino.it>
Tue, 12 Dec 2017 09:53:34 +0000 (10:53 +0100)
committerAndrea Scarpino <me@andreascarpino.it>
Tue, 12 Dec 2017 10:53:31 +0000 (11:53 +0100)
fdroidserver/index.py
fdroidserver/lint.py
fdroidserver/metadata.py
fdroidserver/update.py
locale/fdroidserver.pot
tests/metadata/dump/com.politedroid.yaml
tests/metadata/dump/org.adaway.yaml
tests/metadata/dump/org.smssecure.smssecure.yaml
tests/metadata/dump/org.videolan.vlc.yaml

index 82b5ff331a63747dffc8af1a7732fb6ef9778ddc..6dd30856bbfe7940211ba72623266af12930d83a 100644 (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
index 18bd3d47ea0145c78104a43ac23d1737ce50a723..a5ed3637dcf35981463a689390a0612fa72bdb51 100644 (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': [
index c066d499ce7d68b30ee0cf1e13264aea40e32e26..3c03df728ff60cc17bfd99f8b641903aafc0806c 100644 (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')
index 097513bf40e2dbb1d7d5937131495557d355fbe3..02382d2b941933de287f9dd4ae86a28f22e27b6b 100644 (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,
index 2e9775c47a2d04db22c6bdcadafb4a3a67be10a4..35da355795ba965900963cd1040de604a07bc65f 100644 (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. "
index 90e20bb0cbddf6557c72a35cedaaccfc71bf4c80..8d6ba98284439016671b9249cdf2337dd3eef9be 100644 (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: ''
index 1406fdfd8ca98592976c3e09465feef6f9e38a5a..89595b82a64bb24cdacb2ced9c486771a4b19a9c 100644 (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: ''
index 86005af2ba69abf46faebb0daf19251555eeed0b..b8f9927f651151fc6f5018218535a7c647b67042 100644 (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: ''
index f8295373b042582a1e04c53443bbd12e8c7cae09..e47d51b4c22dc6317d73c92e8f351cefe0200008 100644 (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