mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-12 02:00:28 +03:00
Merge branch 'triple-t-2' into 'master'
parse Triple-T v2.x layout See merge request fdroid/fdroidserver!683
This commit is contained in:
commit
6d11da5e13
37 changed files with 443 additions and 2 deletions
|
|
@ -717,7 +717,7 @@ def _set_author_entry(app, key, f):
|
|||
with open(f, errors='replace') as fp:
|
||||
text = fp.read()[:limit]
|
||||
if len(text) > 0:
|
||||
app[key] = text
|
||||
app[key] = text.strip()
|
||||
|
||||
|
||||
def _strip_and_copy_image(in_file, outpath):
|
||||
|
|
@ -843,7 +843,11 @@ def copy_triple_t_store_metadata(apps):
|
|||
logging.debug('Triple-T Gradle Play Publisher: ' + d)
|
||||
for root, dirs, files in os.walk(d):
|
||||
segments = root.split('/')
|
||||
locale = segments[-2]
|
||||
if segments[-2] == 'listings' or segments[-2] == 'release-notes':
|
||||
locale = segments[-1]
|
||||
else:
|
||||
locale = segments[-2]
|
||||
|
||||
for f in files:
|
||||
if f == 'fulldescription' or f == 'full-description.txt':
|
||||
_set_localized_text_entry(app, locale, 'description',
|
||||
|
|
@ -865,6 +869,10 @@ def copy_triple_t_store_metadata(apps):
|
|||
_set_localized_text_entry(app, segments[-1], 'whatsNew',
|
||||
os.path.join(root, f))
|
||||
continue
|
||||
elif f == 'default.txt' and segments[-2] == 'release-notes':
|
||||
_set_localized_text_entry(app, locale, 'whatsNew',
|
||||
os.path.join(root, f))
|
||||
continue
|
||||
elif f == 'contactEmail' or f == 'contact-email.txt':
|
||||
_set_author_entry(app, 'authorEmail', os.path.join(root, f))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue