Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
card10
firmware
Commits
625ae264
Commit
625ae264
authored
Aug 25, 2019
by
Rahix
Browse files
Merge 'bin field in metadata'
See merge request
card10/firmware!238
parents
ce4a3ac8
645accb3
Pipeline
#3516
passed with stages
in 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
preload/menu.py
View file @
625ae264
...
...
@@ -37,7 +37,7 @@ def read_metadata(app_folder):
return
{
"author"
:
""
,
"name"
:
app_folder
,
"description
r
"
:
""
,
"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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment