update: parse Triple-T v2.x layout

Thanks to the very nice example from Piwigo, included here under the GPLv3+
https://github.com/Piwigo/Piwigo-Android

https://gitlab.com/fdroid/fdroiddata/merge_requests/5579#note_225834868
This commit is contained in:
Hans-Christoph Steiner 2019-10-04 11:06:42 +02:00
parent a7dd7a812f
commit 5904aef5a7
No known key found for this signature in database
GPG key ID: 3E177817BA1B9BFA
37 changed files with 442 additions and 1 deletions

View file

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