mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
include Author/Contact info from Triple-T Gradle Play Publisher
This is just the bare minimum, it adds it to the index, but AuthorPhone and AuthorWebsite are not yet supported by fdroidclient. AuthorName is. #204
This commit is contained in:
parent
9589d13ef2
commit
18f949c62b
2 changed files with 18 additions and 0 deletions
|
@ -93,6 +93,7 @@ default_config = {
|
||||||
'keystore': 'keystore.jks',
|
'keystore': 'keystore.jks',
|
||||||
'smartcardoptions': [],
|
'smartcardoptions': [],
|
||||||
'char_limits': {
|
'char_limits': {
|
||||||
|
'Author': 256,
|
||||||
'Name': 30,
|
'Name': 30,
|
||||||
'Summary': 80,
|
'Summary': 80,
|
||||||
'Description': 4000,
|
'Description': 4000,
|
||||||
|
|
|
@ -574,6 +574,14 @@ def _set_localized_text_entry(app, locale, key, f):
|
||||||
localized[key] = text
|
localized[key] = text
|
||||||
|
|
||||||
|
|
||||||
|
def _set_author_entry(app, key, f):
|
||||||
|
limit = config['char_limits']['Author']
|
||||||
|
with open(f) as fp:
|
||||||
|
text = fp.read()[:limit]
|
||||||
|
if len(text) > 0:
|
||||||
|
app[key] = text
|
||||||
|
|
||||||
|
|
||||||
def copy_triple_t_store_metadata(apps):
|
def copy_triple_t_store_metadata(apps):
|
||||||
"""Include store metadata from the app's source repo
|
"""Include store metadata from the app's source repo
|
||||||
|
|
||||||
|
@ -623,6 +631,15 @@ def copy_triple_t_store_metadata(apps):
|
||||||
_set_localized_text_entry(app, segments[-1], 'WhatsNew',
|
_set_localized_text_entry(app, segments[-1], 'WhatsNew',
|
||||||
os.path.join(root, f))
|
os.path.join(root, f))
|
||||||
continue
|
continue
|
||||||
|
elif f == 'contactEmail':
|
||||||
|
_set_author_entry(app, 'AuthorEmail', os.path.join(root, f))
|
||||||
|
continue
|
||||||
|
elif f == 'contactPhone':
|
||||||
|
_set_author_entry(app, 'AuthorPhone', os.path.join(root, f))
|
||||||
|
continue
|
||||||
|
elif f == 'contactWebsite':
|
||||||
|
_set_author_entry(app, 'AuthorWebSite', os.path.join(root, f))
|
||||||
|
continue
|
||||||
|
|
||||||
base, extension = common.get_extension(f)
|
base, extension = common.get_extension(f)
|
||||||
dirname = os.path.basename(root)
|
dirname = os.path.basename(root)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue