Add Author Name and Author Email fields. (Closes: #90)

This commit is contained in:
Dominik George 2016-01-03 20:49:36 +01:00
parent 622195bf16
commit 7f3434ea50
No known key found for this signature in database
GPG key ID: B79A3C16A0C4F296
8 changed files with 5985 additions and 5920 deletions

View file

@ -62,6 +62,8 @@ app_fields = set([
'Provides',
'Categories',
'License',
'Author Name',
'Author Email',
'Web Site',
'Source Code',
'Issue Tracker',
@ -103,6 +105,8 @@ class App():
self.Provides = None
self.Categories = ['None']
self.License = 'Unknown'
self.AuthorName = None
self.AuthorEmail = None
self.WebSite = ''
self.SourceCode = ''
self.IssueTracker = ''
@ -440,6 +444,10 @@ valuetypes = {
r'^http[s]?://', None,
["WebSite", "SourceCode", "IssueTracker", "Changelog", "Donate"], []),
FieldValidator("Email",
r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$', None,
["AuthorEmail"], []),
FieldValidator("Bitcoin address",
r'^[a-zA-Z0-9]{27,34}$', None,
["Bitcoin"],
@ -1228,6 +1236,8 @@ def write_plaintext_metadata(mf, app, w_comment, w_field, w_build):
w_field_nonempty('Provides')
w_field_always('Categories')
w_field_always('License')
w_field_nonempty('Author Name')
w_field_nonempty('Author Email')
w_field_always('Web Site')
w_field_always('Source Code')
w_field_always('Issue Tracker')