Lua rename project


I am trying to rename a project from command line using Lua. I was hoping that it was as simple as the following:

s = load_session ("/path/to/project/name/", "name")
assert (s)
s:rename ("new-name")

But I get:

Error: /home/erik/PhpstormProjects/dingus/ardour/script/rename.lua:18: attempt to call a nil value (method 'rename')

I found a function called Session::rename(...) in which kind of led me to believe that it might work. It does not though.

So to phrase this into a question:

How do I rename an Ardour project/session using Lua?

Thanks in advance,

Bindings to functions have to be explicitly added. We do that only for select functions and usually also write documentation or examples when doing that.

I’ve just added the binding. With Ardour 6.6.212 or later your script should work.

That is so cool! Thanks a lot!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.