chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
858b398
)
Add Liberapay support
author
Andrea Scarpino
<me@andreascarpino.it>
Tue, 12 Dec 2017 09:53:34 +0000
(10:53 +0100)
committer
Andrea Scarpino
<me@andreascarpino.it>
Tue, 12 Dec 2017 10:53:31 +0000
(11:53 +0100)
fdroidserver/index.py
patch
|
blob
|
history
fdroidserver/lint.py
patch
|
blob
|
history
fdroidserver/metadata.py
patch
|
blob
|
history
fdroidserver/update.py
patch
|
blob
|
history
locale/fdroidserver.pot
patch
|
blob
|
history
tests/metadata/dump/com.politedroid.yaml
patch
|
blob
|
history
tests/metadata/dump/org.adaway.yaml
patch
|
blob
|
history
tests/metadata/dump/org.smssecure.smssecure.yaml
patch
|
blob
|
history
tests/metadata/dump/org.videolan.vlc.yaml
patch
|
blob
|
history
diff --git
a/fdroidserver/index.py
b/fdroidserver/index.py
index 82b5ff331a63747dffc8af1a7732fb6ef9778ddc..6dd30856bbfe7940211ba72623266af12930d83a 100644
(file)
--- a/
fdroidserver/index.py
+++ b/
fdroidserver/index.py
@@
-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('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
# These elements actually refer to the current version (i.e. which
# one is recommended. They are historically mis-named, and need
diff --git
a/fdroidserver/lint.py
b/fdroidserver/lint.py
index 18bd3d47ea0145c78104a43ac23d1737ce50a723..a5ed3637dcf35981463a689390a0612fa72bdb51 100644
(file)
--- a/
fdroidserver/lint.py
+++ b/
fdroidserver/lint.py
@@
-135,6
+135,8
@@
regex_checks = {
'Donate': http_checks + [
(re.compile(r'.*flattr\.com'),
_("Flattr donation methods belong in the FlattrID flag")),
'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': [
],
'Changelog': http_checks,
'Author Name': [
diff --git
a/fdroidserver/metadata.py
b/fdroidserver/metadata.py
index c066d499ce7d68b30ee0cf1e13264aea40e32e26..3c03df728ff60cc17bfd99f8b641903aafc0806c 100644
(file)
--- a/
fdroidserver/metadata.py
+++ b/
fdroidserver/metadata.py
@@
-70,6
+70,7
@@
app_fields = set([
'Changelog',
'Donate',
'FlattrID',
'Changelog',
'Donate',
'FlattrID',
+ 'LiberapayID',
'Bitcoin',
'Litecoin',
'Name',
'Bitcoin',
'Litecoin',
'Name',
@@
-120,6
+121,7
@@
class App(dict):
self.Changelog = ''
self.Donate = None
self.FlattrID = None
self.Changelog = ''
self.Donate = None
self.FlattrID = None
+ self.LiberapayID = None
self.Bitcoin = None
self.Litecoin = None
self.Name = None
self.Bitcoin = None
self.Litecoin = None
self.Name = None
@@
-391,6
+393,10
@@
valuetypes = {
r'^[0-9a-z]+$',
['FlattrID']),
r'^[0-9a-z]+$',
['FlattrID']),
+ FieldValidator("Liberapay ID",
+ r'^[0-9]+$',
+ ['LiberapayID']),
+
FieldValidator("HTTP link",
r'^http[s]?://',
["WebSite", "SourceCode", "IssueTracker", "Changelog", "Donate"]),
FieldValidator("HTTP link",
r'^http[s]?://',
["WebSite", "SourceCode", "IssueTracker", "Changelog", "Donate"]),
@@
-1138,6
+1144,7
@@
def write_yaml(mf, app):
'Changelog',
'Donate',
'FlattrID',
'Changelog',
'Donate',
'FlattrID',
+ 'LiberapayID',
'Bitcoin',
'Litecoin',
'\n',
'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('Changelog')
w_field_nonempty('Donate')
w_field_nonempty('FlattrID')
+ w_field_nonempty('LiberapayID')
w_field_nonempty('Bitcoin')
w_field_nonempty('Litecoin')
mf.write('\n')
w_field_nonempty('Bitcoin')
w_field_nonempty('Litecoin')
mf.write('\n')
diff --git
a/fdroidserver/update.py
b/fdroidserver/update.py
index 097513bf40e2dbb1d7d5937131495557d355fbe3..02382d2b941933de287f9dd4ae86a28f22e27b6b 100644
(file)
--- a/
fdroidserver/update.py
+++ b/
fdroidserver/update.py
@@
-138,7
+138,7
@@
def update_wiki(apps, sortedids, apks):
requiresroot = 'Yes'
else:
requiresroot = 'No'
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 '',
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.Changelog,
app.Donate,
app.FlattrID,
+ app.LiberapayID,
app.Bitcoin,
app.Litecoin,
app.License,
app.Bitcoin,
app.Litecoin,
app.License,
diff --git
a/locale/fdroidserver.pot
b/locale/fdroidserver.pot
index 2e9775c47a2d04db22c6bdcadafb4a3a67be10a4..35da355795ba965900963cd1040de604a07bc65f 100644
(file)
--- a/
locale/fdroidserver.pot
+++ b/
locale/fdroidserver.pot
@@
-586,6
+586,10
@@
msgstr ""
msgid "Flattr donation methods belong in the FlattrID flag"
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. "
#: ../fdroidserver/build.py
msgid ""
"Force build of disabled apps, and carries on regardless of scan problems. "
diff --git
a/tests/metadata/dump/com.politedroid.yaml
b/tests/metadata/dump/com.politedroid.yaml
index 90e20bb0cbddf6557c72a35cedaaccfc71bf4c80..8d6ba98284439016671b9249cdf2337dd3eef9be 100644
(file)
--- a/
tests/metadata/dump/com.politedroid.yaml
+++ b/
tests/metadata/dump/com.politedroid.yaml
@@
-17,6
+17,7
@@
Disabled: null
Donate: null
FlattrID: null
IssueTracker: https://github.com/miguelvps/PoliteDroid/issues
Donate: null
FlattrID: null
IssueTracker: https://github.com/miguelvps/PoliteDroid/issues
+LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''
diff --git
a/tests/metadata/dump/org.adaway.yaml
b/tests/metadata/dump/org.adaway.yaml
index 1406fdfd8ca98592976c3e09465feef6f9e38a5a..89595b82a64bb24cdacb2ced9c486771a4b19a9c 100644
(file)
--- a/
tests/metadata/dump/org.adaway.yaml
+++ b/
tests/metadata/dump/org.adaway.yaml
@@
-40,6
+40,7
@@
Disabled: null
Donate: http://sufficientlysecure.org/index.php/adaway
FlattrID: '369138'
IssueTracker: https://github.com/dschuermann/ad-away/issues
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: ''
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''
diff --git
a/tests/metadata/dump/org.smssecure.smssecure.yaml
b/tests/metadata/dump/org.smssecure.smssecure.yaml
index 86005af2ba69abf46faebb0daf19251555eeed0b..b8f9927f651151fc6f5018218535a7c647b67042 100644
(file)
--- a/
tests/metadata/dump/org.smssecure.smssecure.yaml
+++ b/
tests/metadata/dump/org.smssecure.smssecure.yaml
@@
-37,6
+37,7
@@
Disabled: null
Donate: null
FlattrID: null
IssueTracker: https://github.com/SMSSecure/SMSSecure/issues
Donate: null
FlattrID: null
IssueTracker: https://github.com/SMSSecure/SMSSecure/issues
+LiberapayID: null
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''
License: GPL-3.0
Litecoin: null
MaintainerNotes: ''
diff --git
a/tests/metadata/dump/org.videolan.vlc.yaml
b/tests/metadata/dump/org.videolan.vlc.yaml
index f8295373b042582a1e04c53443bbd12e8c7cae09..e47d51b4c22dc6317d73c92e8f351cefe0200008 100644
(file)
--- a/
tests/metadata/dump/org.videolan.vlc.yaml
+++ b/
tests/metadata/dump/org.videolan.vlc.yaml
@@
-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
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
License: GPL-3.0
Litecoin: null
MaintainerNotes: 'Instructions and dependencies here: http://wiki.videolan.org/AndroidCompile