Added support for externally sourced apps
This commit is contained in:
19
config.py
19
config.py
@@ -29,12 +29,6 @@ Apps = [
|
||||
{"guiname": "Show Framebuffer", "name": "fbcp", "cmd": ["apps/fbcp", "/dev/fb0"]},
|
||||
{"guiname": "Strobo", "name": "strobo", "cmd": "apps/strobo.py"},
|
||||
{"guiname": "Beispiel", "name": "example", "cmd": "apps/example.py"},
|
||||
|
||||
# mathpixel
|
||||
{"guiname": "Structure formation", "name": "swifthohenberg", "cmd": "apps/swifthohenberg.py", "persistent": False},
|
||||
{"guiname": "Quadratisch", "name": "quadratic", "cmd": "apps/quadratic.py"},
|
||||
{"guiname": "Pendel", "name": "pendulum", "cmd": "apps/pendlum.py"},
|
||||
{"guiname": "Konvergenz", "name": "convergence", "cmd": "apps/convergence.py"},
|
||||
|
||||
# juergen/pixelfoo
|
||||
{"guiname": "Colored noise", "name": "cnoise", "cmd": "apps/cnoise", "persistent": False},
|
||||
@@ -55,3 +49,16 @@ Apps = [
|
||||
#{"name": "gif", "cmd": "apps/gif.sh"},
|
||||
#{"name": "colormap", "cmd": "apps/colormap.py"},
|
||||
]
|
||||
|
||||
# load additional apps from config/
|
||||
import os
|
||||
import os.path
|
||||
configs = os.listdir("configs/")
|
||||
import importlib
|
||||
for config in configs:
|
||||
file, ext = os.path.splitext(os.path.basename(config))
|
||||
if ext != ".py" or file[0] == "_":
|
||||
continue
|
||||
modname = "configs."+file
|
||||
lib = importlib.import_module(modname)
|
||||
Apps += lib.Apps
|
Reference in New Issue
Block a user