mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
metadata: write strings directly to txt file
This commit is contained in:
parent
28566f6e57
commit
a9bb5f9713
1 changed files with 11 additions and 6 deletions
|
|
@ -1289,17 +1289,22 @@ def write_txt_metadata(mf, app):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
t = flagtype(f)
|
t = flagtype(f)
|
||||||
out = ' %s=' % f
|
mf.write(' %s=' % f)
|
||||||
if t == TYPE_STRING:
|
if t == TYPE_STRING:
|
||||||
out += v
|
mf.write(v)
|
||||||
elif t == TYPE_BOOL:
|
elif t == TYPE_BOOL:
|
||||||
out += 'yes'
|
mf.write('yes')
|
||||||
elif t == TYPE_SCRIPT:
|
elif t == TYPE_SCRIPT:
|
||||||
out += '&& \\\n '.join([s.lstrip() for s in v.split('&& ')])
|
first = True
|
||||||
|
for s in v.split(' && '):
|
||||||
|
if first:
|
||||||
|
first = False
|
||||||
|
else:
|
||||||
|
mf.write(' && \\\n ')
|
||||||
|
mf.write(s)
|
||||||
elif t == TYPE_LIST:
|
elif t == TYPE_LIST:
|
||||||
out += ','.join(v) if type(v) == list else v
|
mf.write(','.join(v))
|
||||||
|
|
||||||
mf.write(out)
|
|
||||||
mf.write('\n')
|
mf.write('\n')
|
||||||
|
|
||||||
write_plaintext_metadata(mf, app, w_comment, w_field, w_build)
|
write_plaintext_metadata(mf, app, w_comment, w_field, w_build)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue