ardour/tools/luals

27 lines
643 B
Plaintext
Executable File

#!/usr/bin/lua5.3
function scripts (path)
local out = io.popen (
string.format ("find '%s' -maxdepth 1 -type f -iname \"[^_]*.lua\" | grep -ve s_", path)
)
return function()
for file in out:lines() do
return file
end
return nil
end
end
function ardour (v)
local newline = string.find (v['description'], '\n')
if newline then
io.write (string.format ("T:%s:N:%s:D:%s\n", v['type'], v['name'], string.sub (v['description'], 0, newline-1)))
else
io.write (string.format ("T:%s:N:%s:D:%s\n", v['type'], v['name'], v['description']))
end
end
for script in scripts ("share/scripts/") do
loadfile (script)()
end