open_ooc
This commit is contained in:
BIN
locale/de_DE/LC_MESSAGES/open_ooc.mo
Normal file
BIN
locale/de_DE/LC_MESSAGES/open_ooc.mo
Normal file
Binary file not shown.
42
locale/de_DE/LC_MESSAGES/open_ooc.po
Normal file
42
locale/de_DE/LC_MESSAGES/open_ooc.po
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# SOME DESCRIPTIVE TITLE.
|
||||||
|
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||||
|
# This file is distributed under the same license as the PACKAGE package.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2025-04-10 10:55+0200\n"
|
||||||
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
"Language: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: open_ooc.lua:76
|
||||||
|
msgid "open ooc jpeg"
|
||||||
|
msgstr "JPG öffnen"
|
||||||
|
|
||||||
|
#: open_ooc.lua:77
|
||||||
|
msgid "open associated ooc jpegs for selected raw files"
|
||||||
|
msgstr "öffne die zu den ausgewählten RAW-Dateien gehörenden Kamera-JPGs"
|
||||||
|
|
||||||
|
#: open_ooc.lua:96
|
||||||
|
msgid "please select an image"
|
||||||
|
msgstr "kein Bild ausgewählt"
|
||||||
|
|
||||||
|
#: open_ooc.lua:111
|
||||||
|
msgid "selection empty, or no jpeg available"
|
||||||
|
msgstr "kein Bild ausgewählt oder JPG nicht vorhanden"
|
||||||
|
|
||||||
|
#: open_ooc.lua:130
|
||||||
|
msgid "open jpeg"
|
||||||
|
msgstr "JPG öffnen"
|
||||||
|
|
||||||
|
#: open_ooc.lua:132
|
||||||
|
msgid "open associated ooc jpegs for the selected raw files"
|
||||||
|
msgstr "öffne die zu den ausgewählten RAW-Dateien gehörenden Kamera-JPGs"
|
||||||
40
open_ooc.lua
40
open_ooc.lua
@@ -73,8 +73,8 @@ end
|
|||||||
local script_data = {}
|
local script_data = {}
|
||||||
|
|
||||||
script_data.metadata = {
|
script_data.metadata = {
|
||||||
name = _("open OoC JPEG"),
|
name = _("open ooc jpeg"),
|
||||||
purpose = _("open associated OoC JPEGs for selected RAW files"),
|
purpose = _("open associated ooc jpegs for selected raw files"),
|
||||||
author = "Florian Tham <fgtham@gmail.com>",
|
author = "Florian Tham <fgtham@gmail.com>",
|
||||||
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/open_ooc"
|
help = "https://docs.darktable.org/lua/stable/lua.scripts.manual/scripts/contrib/open_ooc"
|
||||||
}
|
}
|
||||||
@@ -84,20 +84,38 @@ script_data.destroy_method = nil -- set to hide for libs since we can't destroy
|
|||||||
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
|
script_data.restart = nil -- how to restart the (lib) script after it's been hidden - i.e. make it visible again
|
||||||
script_data.show = nil -- only required for libs since the destroy_method only hides them
|
script_data.show = nil -- only required for libs since the destroy_method only hides them
|
||||||
|
|
||||||
|
local viewer = {}
|
||||||
|
viewer.executable = "sxiv"
|
||||||
|
viewer.args = ""
|
||||||
|
|
||||||
local function open_ooc() --finalize
|
local function open_ooc() --finalize
|
||||||
local images = dt.gui.selection()
|
local selected_images = dt.gui.selection()
|
||||||
local file_list = ""
|
local file_list = ""
|
||||||
|
|
||||||
if #images == 0 then
|
if #selected_images == 0 then
|
||||||
dt.print(_("please select an image"))
|
dt.print(_("please select an image"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, image in pairs(images) do
|
for _, image in pairs(selected_images) do
|
||||||
file_list = file_list .. image .. " "
|
if df.get_filetype(image.filename) == "CR3" then
|
||||||
dt.print(image)
|
current_image = image.path .. os_path_seperator .. image.filename
|
||||||
|
current_image = string.gsub(current_image, ".CR3", ".JPG")
|
||||||
|
if df.check_if_file_exists(current_image) then
|
||||||
|
file_list = file_list .. current_image .. " "
|
||||||
end
|
end
|
||||||
dt.print(file_list)
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if file_list == "" then
|
||||||
|
dt.print(_("selection empty, or no jpeg available"))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
cmd = viewer.executable .. " " .. viewer.args .. " " .. file_list
|
||||||
|
dt.print_log("open_ooc: " .. cmd)
|
||||||
|
dtsys.external_command(cmd)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@@ -109,15 +127,15 @@ end
|
|||||||
-- Register
|
-- Register
|
||||||
|
|
||||||
dt.gui.libs.image.register_action(
|
dt.gui.libs.image.register_action(
|
||||||
MODULE, _("open associated OoC JPEGs"),
|
MODULE, _("open jpeg"),
|
||||||
function() open_ooc() end,
|
function() open_ooc() end,
|
||||||
_("open associated OoC JPEGs for the selected raw files")
|
_("open associated ooc jpegs for the selected raw files")
|
||||||
)
|
)
|
||||||
|
|
||||||
dt.register_event(
|
dt.register_event(
|
||||||
MODULE,
|
MODULE,
|
||||||
"shortcut",
|
"shortcut",
|
||||||
function(event, shortcut), open_ooc() end,
|
function(event, shortcut) open_ooc() end,
|
||||||
MODULE
|
MODULE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user