script-server icon indicating copy to clipboard operation
script-server copied to clipboard

FEATURE: "group": field in runner.json filled by parent folder name in conf/runners/

Open ojtimsen opened this issue 2 years ago • 5 comments

Hello, ScriptServer checks the conf/runners folders for files with extension .json to load them as runner, even if they are placed in sub-folders of conf/runners.. This is a nice "feature" to allow a folder structure inside the "runners" folder to sort the runners into. To explain my current aim, the following example structure:

conf/runners/helpers conf/runners/helpers/show_groups.json conf/runners/helpers/show_users.json

In the .json I currently define statically that I want the runners be sorted into the "group": "helpers" but I ask myself, if there is a way to set in the "group": field the foldername of the folder where the .json file is stored in? If this would be possible, this would allow a very dynamic menu structure simply based on the folder name a .json file of a runner is placed into.

Thank you in advance for reading and again big thanks for this project! toj

ojtimsen avatar Sep 28 '23 22:09 ojtimsen

Hi @ojtimsen , unfortunately this is not possible, but this is a nice proposal

bugy avatar Oct 02 '23 13:10 bugy

Done, now this is possible to enable this behaviour via this option: https://github.com/bugy/script-server/wiki/Server-configuration#--group_by_folders (please note, that it's a nested property!). This option is enabled by default since 1.19

bugy avatar Oct 15 '23 16:10 bugy

Hi @bugy, thank you for this quick implementation.. I tested it a few seconds ago and I already love this "feature" and the default to enable it by default.. It directly worked in version 1.19 for me, after removing the "group" : "helpers" tag in the .json files of my runners.. Great week to you!

ojtimsen avatar Oct 16 '23 07:10 ojtimsen

is this included in any release? or do I need to get the git master version?

muzzol avatar Jul 09 '24 09:07 muzzol

Hi, you need to use master (dev) version

bugy avatar Jul 09 '24 09:07 bugy