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

@ -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')