Commit 625ae264 authored by Rahix's avatar Rahix
Browse files

Merge 'bin field in metadata'

See merge request card10/firmware!238
parents ce4a3ac8 645accb3
......@@ -37,7 +37,7 @@ def read_metadata(app_folder):
return {
"author": "",
"name": app_folder,
"descriptionr": "",
"description": "",
"category": "",
"revision": 0,
}
......@@ -71,7 +71,12 @@ def list_apps():
# with or without metadata.json
for appFolder in dirlist:
if not (appFolder.endswith(".py") or appFolder.endswith(".elf")):
apps.append(["/apps/%s/__init__.py" % appFolder, read_metadata(appFolder)])
metadata = read_metadata(appFolder)
if not metadata.get("bin", None):
fileName = "/apps/%s/__init__.py" % appFolder
else:
fileName = "/apps/%s/%s" % (appFolder, metadata["bin"])
apps.append([fileName, metadata])
# list simple python scripts
for pyFile in dirlist:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment