Project

General

Profile

Feature #9830

"darktable-lua" command to invoke a Lua script

Added by Fraser McCrossan over 4 years ago. Updated over 3 years ago.

Status:
Fixed
Priority:
Low
Category:
Lua
Target version:
Start date:
02/24/2014
Due date:
% Done:

100%

Affected Version:
1.4
System:
all
bitness:
64-bit
hardware architecture:
amd64/x86

Description

Current status of Lua scripting opens up many possibilities but everything is exclusively callback-based. I suggest adding a "darktable-lua" command which loads up the DT environment then invokes a Lua script with optional parameters. Example usage:

darktable-lua export-all-above-rating.lua 4

darktable-lua remove-tag-from-all.lua vacation

History

#1 Updated by Jérémy Rosen over 4 years ago

  • % Done changed from 0 to 20
  • Target version set to Future
  • Status changed from New to Triaged

This is the plan but

  • in the long term
  • not in the way you describe

I intend to have DT loadable as lua library. you wouldn't launch a special command line tool, you would be able to use dt in a normal lua script by adding a "requre lua" at the top

in the mean time, you can just call os.exit() at the end of your luarc to stop DT just after running your script. it's a workaround that works

#2 Updated by Jérémy Rosen over 3 years ago

  • % Done changed from 20 to 100
  • bitness set to 64-bit
  • Status changed from Triaged to Fixed
  • System set to all
  • Affected Version set to 1.4

you can now load DT as a lua lib, which implements what you ask for, how to do that in documented in the usermanual

Also available in: Atom PDF