- You can download the newest release archive from https://github.com/UliGesing/Darktable-Initial-Workflow-Module/releases
-
This script can be used together with darktable. See https://www.darktable.org/ for more information.
-
Do you use darktable to develop your raw images? Do you often follow the same initial steps for new images? Do you often use the same modules in darkroom view and configure them in the same way before going into the details? Then this script can save you work.
-
It offers a new "inital workflow" module both in lighttable and darkroom view. It executes some automatic functions that can also be accessed via the graphical user interface (e.g. magic wand controls). It can be used to do some configuration for an initial image workflow. To do this, the new module provides several workflow steps like "lens correction" or "adapt exposure". It calls some automatisms of different modules in darkroom view, enables your preferred modules and configures some default settings. If this suits your workflow, the script saves some clicks and time.
-
This script performs tasks that are comparable to those of the module presets. Depending on your current use case, one or the other is more suitable. Presets are faster, but more static. The script uses some algorithms in darktable, so it takes more time. It mimics manual editing by the user and therefore "reacts" more to the specific image.
-
This chapter describes how to use the script. Detailed installation instructions follow below.
-
The new module offers some buttons, a list of configurable darktable modules and some common options, both in lighttable and darkroom view. Feel free to use these configurations and options in any order or combination.
-
In preparation for running the script, use the following buttons in darkroom view to rotate the image, adjust the perspective, crop the image and to adjust the exposure until the mid-tones are clear enough. These buttons activate and display the associated module.
- The new module offers two subpages: First of all a list of supported modules and secondly a list of some common settings. You can switch between these subpages by selecting one of the buttons "show modules" or "show settings".
- Choose "show modules" and adapt your personal configuration for each step of the entire workflow. Several steps and configurations are offered, see the tooltips within the module for more information. Each step of the workflow addresses a module of the pipeline in the darktable darkroom view. Your settings are saved in darktable preferences and restored after the next start of the application
- Every step provides two configurations: The first one is a basic configuration that is applied before actually performing the main configuration. You can decide, if you want to ignore, enable, reset or disable the module. There are various possibilities:
![]()
- The predefined
defaultvalue (one of the following) can be set.- The workflow step can be
ignoredat all, the corresponding module remains unchanged, regardless of the second setting.- The module can first be
enabledin order to apply the selected configuration afterwards, based on current module settings.- A module
resetcan be carried out, the selected configuration is then applied based on default module settings.- The module can be
disabledwithout making any further changes and regardless of the second setting.
- The second configuration depends on your first and basic configuration. If the basic configuration is set to
resetorenable, the second configuration is applied. If you chooseunchanged, the corresponding module keeps unchanged (apart from the basic configuration above). Each step offers several choices, for example:
>>
- Via
all module basics and all module settings you can select standard configurations for all steps.
- Choose "show settings" and adapt the common settings. Several common settings are offered, see the tooltips for more information. Your settings are saved in darktable preferences and restored after the next start of the application.
-
Do you want to know more about what the individual steps of the workflow change? You can activate
show modules. During script execution in darkroom view, modules are displayed as changes are made. This way you will see the changes made. Best practices: Selectignorefor all steps. Then activateenableorresetfor the step that interests you and configure it. Withrunonly this one configuration is executed and the affected module is displayed. -
Via
all common settingsyou can select standard configurations for these settings. You can activate or deactive all common settings.
- Once the configuration is complete, execute the script using the
runbutton. If you use it from lighttable view, you can select one or more images. Clicking the run button, selected image(s) are opened in darkroom and all steps are performed as configured. If you use it from darkroom view, the currently opened image is processed. The order during execution is from bottom to top, along the darktable pixel pipeline.
- During script execution a progress bar is displayed. You can find it at the buttom of your darktable window. You can also cancel the script run using the progress bar
Xcontrol.
- Some calculations take a certain amount of time. Depending on the hardware equipment also longer. This script waits and attempts to detect timeouts.If steps take much longer than expected, those steps will be aborted. You can configure the default timeout (ms). Before and after each step of the workflow, the script waits this time. In other places also a multiple (loading an image) or a fraction (querying a status).
- This script requires darktable 5.0. The script was developed and tested on Linux (Arch-based EndeavourOs), but it should also work on Windows. You need darktable and Lua installed on your machine. See darktable documentation for your first steps: https://docs.darktable.org/usermanual and choose chapter "Scripting with Lua" in the left panel.
Some examples and contributed scripts come with your darktable lua installation. The initial module script can be installed at the same place.
-
lua script folders on Linux:
/home/[user_name]/.config/darktable/lua/examples -
lua script folders on Windows:
%LocalAppData%/darktable/lua/examples
-
Download the newest release archive
InitialWorkflowModule.zipfrom https://github.com/UliGesing/Darktable-Initial-Workflow-Module/releases. Extract this archive and all contained folders to your darktable lua script examples folder. -
After installation, your folder structure at
[...]/darktable/lua/examples/InitialWorkflowModule/should look like this. The main scriptInitialWorkflowModule.luauses some modules in the lib folder.
After extracting the archive, you have to integrate it into darktable (more precisely in the named luarc file), using one of the following methods. At startup, darktable will automatically run luarc. All lua scripts are integrated and started from this file. You can find it here:
-
luarc directory on Linux:
/home/[user_name]/.config/darktable -
luarc directory on Windows:
%LocalAppData%/darktable
-
edit your luarc file to activate the script manager. The luarc file should contain the following line of code. Restart darktable and use darktable script manager to start the script, see https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/tools/script_manager/ for details
-
in luarc:
require "tools/script_manager" -
there should be no second entry in luarc to require the InitialWorkflowModule from here
-
start it from darktable script manager examples:
-
edit your luarc file to integrate the initial workflow script directly, without using darktable script manager. Add a new line to your luarc file starting with
requireand the path of the script file. Restart darktable, the initial workflow script is executed and displayed as a new module. -
in luarc:
require "examples.InitialWorkflowModule.InitialWorkflowModule"
-
you can extract the script archive to any other folder, e.g. your git repository directory. Edit your luarc file to extend the package path and to require the script. Add the following two lines of code and adjust the path name. Restart darktable, the initial workflow script is executed and displayed as a new module.
-
in luarc:
package.path = package.path .. ";[any path]/InitialWorkflowModule/?.lua"
require "InitialWorkflowModule"
- You can execute darktable with additional parameters
darktable -d luaordarktable.exe -d luato get some loggings. This is very helpful to see what is going on during script execution and to identify errors. On Windows, logging messages are written to a logfile, see https://www.darktable.org/about/faq/#faq-windows-logs. On Linux, logging messages are written to your command line.
- Do you have any suggestions for further steps or options? Which darkroom modules do you use most often? With which settings does your own workflow start? Just let me know or see the description below how to do it yourself.
- This script should work with different user interface languages, as configured in darktable preferences. Do you want to translate script outputs into your language? Please let me know. Together we can do that. After a short training, it's fairly easy to deal with gettext tools, .po files, .mo files and to upload your translation to the Github repository. You don't have to be a programmer for this, the translation is done in separate text files.
- To modify the script, clone the whole repository or download Source.zip archive. You can easily customize steps or add new ones. These steps are implemented in a separate lua file "WorkflowSteps.lua" in subfolder "Modules". You can find more details within this file.
- The git repository provides some additional files to execute module tests. This is used during module development and deployment. Within the script code there is an additional and optional module test implementation. This should be disabled and not visible for general use of the script. You can find it in file "ModuleTests.lua" in subfolder "Modules". You can find more details within this file.











