lua-scripts icon indicating copy to clipboard operation
lua-scripts copied to clipboard

Proposal: Organize scripts by function rather than origin

Open wpferguson opened this issue 5 years ago • 6 comments

Problem: Currently there are 2 main categories of scripts, official and contrib. This organization is based on who contributed the scripts, developers: i.e. official, and the community: i.e. contrib. What has happened over time is most of the new scripts are ending up in contrib. If you use script_manager, then you have to scroll through numerous scripts to find the one you want.

Proposal: Organize the scripts into directories based on their function:

  • Tagging

    • delete_long_tags.lua
    • delete_unused_tags.lua
    • copy_attach_detach_tags.lua
    • LabelsToTags.lua
    • photils.lua
    • quicktag.lua
    • rename-tags.lua
    • select_untagged.lua
    • face_recognition.lua
  • Mapping

    • geoJSON_export.lua
    • geoToolbox.lua
    • gpx_export.lua
    • kml_export.lua
    • clear_GPS.lua
  • Processing

    • enfuse.lua
    • cr2hdr.lua
    • enfuseAdvanced.lua
    • ext_editor.lua
    • gimp.lua
    • HDRMerge.lua
    • hugin.lua
    • image_stack.lua
    • OpenInExplorer.lua
    • autostyle.lua
    • video_ffmpeg.lua
  • Image Management

    • copy_paste_metadata.lua
    • import_filter_manager.lua
    • import_filters.lua
    • AutoGrouper.lua
    • CollectHelper.lua
    • fujifilm_ratings.lua
    • image_time.lua
    • rate_group.lua
    • transfer_hierarchy.lua
  • User Interface

    • generate_image_txt.lua
    • image_path_in_ui.lua
    • save_selection.lua
  • Presentation

    • selection_to_pdf.lua
    • slideshowMusic.lua
  • Post Processing

    • RL_out_sharp.lua
  • Tools

    • exportLUT.lua
    • executable_manager.lua
    • script_manager.lua

Please feel free to comment, make suggestions, suggest alternatives...

wpferguson avatar Dec 22 '20 17:12 wpferguson

Maybe out of scope but some of the scripts (maybe the oldest ones) are now covered by the core dt, like, if I'm not mistaken:

copy_attach_detach_tags.lua rename-tags.lua clear_GPS.lua copy_paste_metadata.lua

phweyland avatar Dec 22 '20 18:12 phweyland

When I was making the list I started wondering if some of them had been incorporated into the core.

I didn't realize some of the functionality that was in the metadata part of the menu. Nice!

One question, when I click refresh exif, is it supposed to only refresh what I checked or everything? I checked geo tags, but it cleared the rating too.

wpferguson avatar Dec 22 '20 20:12 wpferguson

I would like to see the dt Lua capability directly rolled into the main dt code rather than being standalone. The current Lua-5.4 version is not supported by dt usage.

davidvj avatar Dec 23 '20 01:12 davidvj

Actually the Lua 5.3 interpreter is embedded in darktable. Then there is a layer of code that interfaces Lua to darktable so that the two can communicate. The option to use it is disabled for normal builds. My understanding of the reason for this is that some distributions have a problem including a package that has other software embedded in it.

If you can compile from source then set DONT_USE_INTERNAL_LUA to OFF in the DefineOptions.cmake.

wpferguson avatar Dec 23 '20 01:12 wpferguson

I am avoiding 'compiling from source' and use the daily git from Arch. There are enough complications in this world  for my tired brain. Thanks for the option however.

David

On 2020-12-22 5:40 p.m., wpferguson wrote:

Actually the Lua 5.3 interpreter is embedded in darktable. Then there is a layer of code that interfaces Lua to darktable so that the two can communicate. The option to use it is disabled for normal builds. My understanding of the reason for this is that some distributions have a problem including a package that has other software embedded in it.

If you can compile from source then set DONT_USE_INTERNAL_LUA to OFF in the DefineOptions.cmake.

davidvj avatar Dec 23 '20 02:12 davidvj

After a lot of thought on this I've decided to add the capability to categorize the scripts to script_manager rather than deciding what goes where. Using script_manager the user can organize the scripts in a way that makes sense to them with labels in whatever language they have configured. Each script will contain a suggested category, probably based on the above list, that script_manager can use to to give a starting point.

wpferguson avatar Jun 05 '21 17:06 wpferguson