Commit 645accb3 authored by Kloenk's avatar Kloenk Committed by Rahix
Browse files

feat(menu.py): Add `bin` field to metadata

parent ce4a3ac8
...@@ -37,7 +37,7 @@ def read_metadata(app_folder): ...@@ -37,7 +37,7 @@ def read_metadata(app_folder):
return { return {
"author": "", "author": "",
"name": app_folder, "name": app_folder,
"descriptionr": "", "description": "",
"category": "", "category": "",
"revision": 0, "revision": 0,
} }
...@@ -71,7 +71,12 @@ def list_apps(): ...@@ -71,7 +71,12 @@ def list_apps():
# with or without metadata.json # with or without metadata.json
for appFolder in dirlist: for appFolder in dirlist:
if not (appFolder.endswith(".py") or appFolder.endswith(".elf")): 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 # list simple python scripts
for pyFile in dirlist: 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