Note de ce sujet :
  • Moyenne : 0 (0 vote(s))
  • 1
  • 2
  • 3
  • 4
  • 5
Ouvrir le dossier d'origine de l'image à partir de DT ?
#45
Bonjour Manu,

L'API darktable/LUA a changé récemment comme annoncé dans un mail par William Ferguson sur la lidie darktable-dev le 2 février dernier :

Citation :You'll want to update your lua-scripts to the latest version which is compatible with the lua events API change as described in the darktable 3.6 Lua roadmap (https://github.com/darktable-org/darktable/issues/8052).


J'ai modifié le script, mais j'ai oublié de poster la modification ici, la voici :
Code :
--[[
FNAV
launch file navigator in photo directory with a shortcut

AUTHOR
Jean-Pierre Verrue (contact@jpverrue.fr)

INSTALLATION
* copy this file in $CONFIGDIR/lua/ where CONFIGDIR
is your darktable configuration directory
* add the following line in the file $CONFIGDIR/luarc
  require "fnav"

USAGE
* configure this script :
* set a shortcut in preferences->shortcut->lua
* set file navigator path in preferences->lua options
* set file navigator options in preferences->lua options
* select a photo
* type your shortcut
* after use dont forget to close file navigator window !

LICENSE
GPLv2
]]

local dt = require "darktable"

dt.preferences.register("file_navigator","navigator_options",
"string","options",
"options du navigateur de fichier","")

dt.preferences.register("file_navigator","navigator_path",
"string","navigateur de fichiers",
"chemin complet du navigateur de fichier","")

local function fnav_shortcut(event, shortcut)
  local images = dt.gui.action_images
  local image_path = string.gsub(tostring(images[1].path), '"', '\\"')
  local navigator_path = dt.preferences.read("file_navigator", "navigator_path", "string")
  local navigator_options = dt.preferences.read("file_navigator", "navigator_options", "string")
  local command = navigator_path.." "..navigator_options..' "'..image_path..'"'
  dt.print_error("command="..command)
  dt.control.execute(command)

end

dt.register_event("fnav", "shortcut", fnav_shortcut, "Lancer le navigateur de fichiers")
Désolé pour l'oubli :-(
Mes photos : jpverrue.fr
Répondre


Messages dans ce sujet
RE: Ouvrir le dossier d'origine de l'image à partir de DT ? - par jpverrue - 20-02-21, 08:32

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)