mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
fdroid update --create-metadata
now outputs YAML format
As part of the push towards using YAML as the main metadata format, this makes the blank template be a .yml file.
This commit is contained in:
parent
75ebb6e8cc
commit
3cb936ae92
1 changed files with 9 additions and 14 deletions
|
@ -1721,20 +1721,15 @@ def main():
|
||||||
if 'name' not in apk:
|
if 'name' not in apk:
|
||||||
logging.error(apk['packageName'] + ' does not have a name! Skipping...')
|
logging.error(apk['packageName'] + ' does not have a name! Skipping...')
|
||||||
continue
|
continue
|
||||||
f = open(os.path.join('metadata', apk['packageName'] + '.txt'), 'w', encoding='utf8')
|
with open(os.path.join('metadata', apk['packageName'] + '.yml'), 'w') as f:
|
||||||
f.write("License:Unknown\n")
|
app = metadata.App()
|
||||||
f.write("Web Site:\n")
|
app.Name = apk['name']
|
||||||
f.write("Source Code:\n")
|
app.Summary = apk['name']
|
||||||
f.write("Issue Tracker:\n")
|
app.CurrentVersionCode = 2147483647 # Java's Integer.MAX_VALUE
|
||||||
f.write("Changelog:\n")
|
app.Categories = [os.path.basename(os.path.dirname(os.getcwd()))]
|
||||||
f.write("Summary:" + apk['name'] + "\n")
|
metadata.write_yaml(f, app)
|
||||||
f.write("Description:\n")
|
logging.info("Generated skeleton metadata for " + apk['packageName'])
|
||||||
f.write(apk['name'] + "\n")
|
newmetadata = True
|
||||||
f.write(".\n")
|
|
||||||
f.write("Name:" + apk['name'] + "\n")
|
|
||||||
f.close()
|
|
||||||
logging.info("Generated skeleton metadata for " + apk['packageName'])
|
|
||||||
newmetadata = True
|
|
||||||
else:
|
else:
|
||||||
msg = apk['apkName'] + " (" + apk['packageName'] + ") has no metadata!"
|
msg = apk['apkName'] + " (" + apk['packageName'] + ") has no metadata!"
|
||||||
if options.delete_unknown:
|
if options.delete_unknown:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue