Project

General

Profile

LuaScripts for darktable 1.4

This page is a list of scripts provided by beta testers of the lua API. There is no guarentee whatsoever that they will work. The API is still in beta and might have changed since the script was uploaded.

This page contains scripts for version 1.4 of darktable.

For scripts for version 1.6 and above, see the separate github repository

mosaic.lua Simple mosaic script

  • author : boucman
  • tested with 1.5+133~g7ff07de

This script is an example of storage implemented in lua. This is not complete nor polished but it shows how to implement a storage module in lua.

the script must be saved in ~/.config/darktable/lua/ (the directory might not exist)

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "mosaic"

a new entry mosaic generator will be added to the storage list. Using it will create a mosaic of selected images in a temporary directory

thanks to hal_from_2001 for the idea an the original implementation

(gm montage?)

save_selection.lua Selection manipulation shortcuts

  • author : boucman
  • tested with 1.3+265~gd7f3d1a

This script will add a couple of shortcuts to help manipulate selection.

the script must be saved in ~/.config/darktable/lua/ (the directory might not exist)

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "save_selection"

These shortcuts allow you to save and restore the current selection to/from five different save bufffers.

There is also a shortcut to exchange the current selection with the content of a fast buffer.

hugin.lua Call hugin panorama stitcher

  • autor: wgoetz, derived from mosaic.lua
  • tested with 1.5+133~g7ff07de

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "hugin"

Select input images for a panorama, call this and proceed in hugin.

reject_removed.lua Rejects removed images

  • autor: LebedevRI
  • tested with 1.5+848~g3e636c6

Select some images, export them, manually delete some exported images, then call this script - it will mark removed [exported] images as rejected.

tagmanipulation.lua Copy attach and detach tags from images

  • author: chrik5
  • tested with: 1.5+1141~gcf8e824
  • update: don't attach darktables internal tags

Three shortcuts will be registered for copying, attaching and detaching tags. You have to assign the shortcut keys within the configuration tap shortcuts -> Lua. Select one image and copy the tags by hitting your shortcut. Select images and hit your shortcut for attaching tags to single or multiple images. You can detach all tags from an image execpt those containing 'darktable' with the 3rd shortcut.

gps_select.lua Select all images with or without GPS informations

  • author: Tobias Jakobs
  • tested with: 1.4

Two shortcuts will be registered for selecting images with or without GPS information. You have to assign the shortcut keys within the configuration tap shortcuts -> Lua.

the script must be saved in ~/.config/darktable/lua/ (the directory might not exist)

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "gps_select"

kml_export.lua KML Export of GeoTaged Images

  • author: Tobias Jakobs
  • tested with: 1.4

This script adds the new export "KML export". The export creates a KML file and thumbnails of all exported images.
In the Lua options tab in the options you can set the export folder, if you want a path connecting the images and if you want to open the file after export.

To use this script you need the Xdg-utils and ImageMagick installed. The KML files can be opened with GoogleEarth or Marble.

the script must be saved in ~/.config/darktable/lua/ (the directory might not exist)

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "kml_export"

calcDistance.lua Calculate the distance from latitude and longitude in km

  • author: Tobias Jakobs
  • tested with: 1.4
  1. Save the script in ~/.config/darktable/lua/ (the directory might not exist)
  2. Add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)
    require "calcDistance"
  3. Assign the shortcut keys within the configuration tab Shortcuts -> Lua.
  4. Select or highlight two images and hit your shortcut to calculate the distance between the images.

videot.lua Video export

  • author: Tobias Jakobs
  • tested with: 1.4

This script adds the new export "Video Export". The export creates a video of all exported images.
In the Lua options tab in the options you can set the export folder, the frames per second and if you want to open the file after export.

To use this script you need the Xdg-utils and mencoder installed.

the script must be saved in ~/.config/darktable/lua/ (the directory might not exist)

add the following line in the file ~/.config/darktable/luarc (again, the file might not exist)

require "video"

readtagsfromfile.lua Read tags from textfile and create new tags in darktable

  • author: Rudolf Martin
  • tested with: 1.4.2

One shortcut will be registered for reading tags from inputfile ".config/darktable/tagfile.txt". You have to assign the shortcut key within the configuration tap shortcuts -> Lua. Select image and hit your shortcut for the script. The new tags appear in the taglist. There is no correlation to selected images. Please change path to file in the script according to your need.

the script must be saved in ~/.config/darktable/lua/

add the following line in the file ~/.config/darktable/luarc

require "readtagsfromfile"

comfort_ratings.lua Decrease / Increase star ratings on key press

  • Author: Jesko N
  • Tested with: 1.4.1
  1. Save the script in ~/.config/darktable/lua/
  2. Add the following line to the file ~/.config/darktable/luarc
    require "comfort_ratings"
  3. Assign the shortcut keys within the configuration tab Shortcuts -> Lua.
  4. Select or highlight image(s) and hit your shortcut to decrease/increase the current star rating.

selectgroup.lua Extend selection to all images grouped with the current images

  • Author: Jérémy Rosen
  • Tested with: 1.6
  1. Save the script in ~/.config/darktable/lua/
  2. Add the following line to the file ~/.config/darktable/luarc
    require "selectgroup"
  3. Assign the shortcut keys within the configuration tab Shortcuts -> Lua.
  4. Select or highlight image(s) and hit your shortcut to extend your selection to all images grouped with the selected/highlighted images.

pentax-lens-fix.lua Fixes EXIF lens description for Tokina AT-X Pro AF 28-70 f/2.8 and Sigma 30mm f/1.4 EX DC on Pentax

  • Author: Sebastian Witt
  • Tested with: 1.6
  1. Save the script in ~/.config/darktable/lua/
  2. Add the following line to the file ~/.config/darktable/luarc
 require "pentax-lens-fix" 
  1. Assign the shortcut keys within the configuration tab Shortcuts -> Lua.
  2. Select or highlight image(s) and hit your shortcut to change the EXIF lens information.

mosaic.lua (501 Bytes) Jérémy Rosen, 05/16/2013 07:58 PM

save_selection.lua (476 Bytes) Jérémy Rosen, 07/11/2013 05:14 PM

mosaic.lua (651 Bytes) Wolfgang Goetz, 01/13/2014 09:09 PM

hugin.lua (542 Bytes) Wolfgang Goetz, 01/13/2014 09:09 PM

reject_removed.lua (506 Bytes) Roman Lebedev, 04/30/2014 11:25 PM

tagmanipulation.lua (1.32 KB) Christian Kanzian, 05/30/2014 10:53 PM

gps_select.lua (1.56 KB) Tobias Jakobs, 06/07/2014 09:36 AM

kml_export.lua (7.51 KB) Tobias Jakobs, 06/08/2014 07:30 PM

video.lua (2.9 KB) Tobias Jakobs, 06/08/2014 07:31 PM

hugin.lua - fine tuning (571 Bytes) Tobias Jakobs, 06/26/2014 10:01 PM

kml_export.lua - KMZ support, bugfixes (9.69 KB) Tobias Jakobs, 06/26/2014 10:02 PM

gps_select.lua - fine tuning (1.56 KB) Tobias Jakobs, 06/26/2014 10:02 PM

readtagsfromfile.lua (616 Bytes) Rudolf Martin, 08/13/2014 07:57 PM

comfort_ratings.lua - Decrease / Increase star ratings on key press (1.91 KB) Jesko N, 08/15/2014 09:18 PM

selectgroup.lua (403 Bytes) Jérémy Rosen, 10/01/2014 11:19 PM

calcDistance.lua (2.25 KB) Tobias Jakobs, 11/16/2014 09:45 PM

pentax-lens-fix.lua - Fixes EXIF lens description for a Tokina and Sigma lens on Pentax (1.52 KB) Sebastian Witt, 01/13/2015 08:51 PM

Also available in: PDF HTML TXT