mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
Add script to list Lua scripts for a html news page.
This commit is contained in:
parent
f1ec998653
commit
fcf4e3e9eb
1 changed files with 36 additions and 0 deletions
36
tools/list_scripts.lua
Executable file
36
tools/list_scripts.lua
Executable file
|
|
@ -0,0 +1,36 @@
|
||||||
|
#!/usr/bin/lua5.3
|
||||||
|
|
||||||
|
top = arg[1] or "./"
|
||||||
|
|
||||||
|
function scripts ()
|
||||||
|
local out = io.popen (
|
||||||
|
string.format ("find '%s' -maxdepth 1 -type f -iname \"[^_]*.lua\" 2>/dev/null | grep -v '/s_'", top .. "share/scripts/")
|
||||||
|
)
|
||||||
|
return function()
|
||||||
|
for file in out:lines() do
|
||||||
|
return file
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function list_script_types (h, t)
|
||||||
|
function ardour (v)
|
||||||
|
if v['type'] == t then
|
||||||
|
print ("<dt>" .. v['name'] .. "<dt><dd>" .. v['description'] .. "</dd>")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
print ("<h2>" .. h .. "</h2>")
|
||||||
|
print ("<dl>")
|
||||||
|
for script in scripts () do
|
||||||
|
loadfile (script)()
|
||||||
|
end
|
||||||
|
print ("</dl>")
|
||||||
|
end
|
||||||
|
|
||||||
|
list_script_types ("DSP Plugins", "dsp")
|
||||||
|
list_script_types ("Session Wide Realtime", "session")
|
||||||
|
list_script_types ("Editor Actions", "EditorAction")
|
||||||
|
list_script_types ("Editor Callbacks", "EditorHook")
|
||||||
|
list_script_types ("Session Templates", "SessionInit")
|
||||||
Loading…
Add table
Add a link
Reference in a new issue