Reorganizing the Lua scripts

The Lua scripts are currently organized in effectively 2 used folders, contrib and official.

contrib is supposed to be maintained by the contributor, but over the years it’s just been fixed by whoever. official is supposed to be maintained by the darktable team, but has been pretty stagnant until lately when I’ve added more to it.

The biggest issue I have with the current organization is most of the scripts are in one folder and you have to weed through them to find the one you want. My thought is to divide them by where they are used or what they do. So if you want to look/comment, the RFC issue is attached.

8 Likes

I read the GitHub post, nice work.

Maybe, a strange suggestion. But the example scripts are very useful when you want to start writing your own scripts. But other than that… not so much. For me it would make sense it they would be removed from the collection themselves and are added to documentation.

1 Like

Not true for the multi_os.lua. It adds a button to extract the embedded jpeg :wink:
And being able to copy and adjust them is also nice.

Personally, I am ok with the current structure. One nice thing about the folder structure is that I don’t have to wade through a lot of pages to find what I want. But I understand that developers and maintainers may need a different structure, so I’d be fine with whatever is decided.

1 Like

Ditto for me.

1 Like

Time to give the multi_os.lua a different status.
Yes, I don’t say that the examples are bad, they are actually very useful! My question is more: do they really fit in this collection.

They are handy in that you can copy and paste from them. Especially when I forget the arguments for registering a preference :smile:

That should happen and the script really needs rewritten anyway since ufraw-batch is no longer supported.

x-touch is in there also and probably should be moved.

My long range plan is to let the users define their own categories for the scripts and “arrange” them in a way that makes sense to them.

The interim step to that is attaching “tags” to each script so that we can sort them into categories such as

  • selection - scripts built to deal with selections
  • collection - scripts built to deal with collections
  • shortcut - scripts that provide shortcuts
  • exporter - scripts that export
  • etc, etc, etc.

For me the goal is to provide smaller, focused lists so that the user can find the script they need faster. Since we are using “tags” the same script can show up in more that one category.

5 Likes

I think some organizing would be nice. Currently, the contrib scripts I don’t use, I simply put in another folder, called ‘unused’, and leave the scripts I do use in the contrib folder. If I ever need them (for me, a rare occurence), I move them.

if you’re adding tags maybe something equivalent to “contrib” and “official”, if that would be useful

or “experimental” and “mature” or whatever

@wpferguson I would really like to thank you for your dedication to Lua scripts. They are a big plus for DT.

4 Likes

Agreed, it’s a relatively underrated subsystem that opens a lot of possibilities. Thanks, @wpferguson :beers:

1 Like