Howto start external program on button press

Hi,

I would like to add a button to the file explorer that starts an external program on the server after pressing it. Optionally with a checkbox which file it should work on or - even better - a button in the online text editor.

I have never wriiten a Nextcloud app, although I wrote many different apps and programs. Maybe one can give me a hint, where to start. It should not be a full-featured GUI, it is just a compile on a source code. (https://lilypond.org/)

Many thanks for your hints!

Ch.

We have an app to run external scripts when a file changed: Workflow external scripts - Apps - App Store - Nextcloud

Could that help?

Thanks! I think this is exactly what I am looking for.

But to be honest, I am a little bit stuck, because I would need an log output. How to get this, because I am not sure if I set the pathes correctly…

I would like to call /usr/bin/lilypond with the updated file in the directory /var/www/nextcloud_data/user/files/ouput

Maybe you can give me a hint for the correct setting for the run script and/or a hint howto get the log file

Ch.

Sorry, I’m not really familiar with the workflow_script app.

Isn’t the example at https://github.com/nextcloud/workflow_script?tab=readme-ov-file#example what you are looking for?

Basically this example fits, but I am not sure about the file locations, so the path were the script is run from. That’s why I’m looking for a possibility to get log output