Compare commits
79 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
025f4299ea | ||
|
|
dc50d40886 | ||
|
|
867c49b1b9 | ||
|
|
13f02c95ea | ||
|
|
d55dae73f0 | ||
|
|
34b9831472 | ||
|
|
014a0fc1c9 | ||
|
|
bf17dccd69 | ||
|
|
890168d0d0 | ||
|
|
191aecacdf | ||
|
|
44ec01b136 | ||
|
|
a177da2040 | ||
|
|
c899040688 | ||
|
|
e8af665b3c | ||
|
|
875734d455 | ||
|
|
14d5a79db2 | ||
|
|
e1b2715ee9 | ||
|
|
7ecd5ca55d | ||
|
|
931e7a4d37 | ||
|
|
1792410efe | ||
|
|
8cbd9224f1 | ||
|
|
24b552d619 | ||
|
|
68ae9326bf | ||
|
|
b4626f2787 | ||
|
|
2fc8ed78e4 | ||
|
|
236b25a235 | ||
|
|
a4f6af73ec | ||
|
|
fad74d6438 | ||
|
|
3e2d4c956d | ||
|
|
cd1d623390 | ||
|
|
9e0374d597 | ||
|
|
e47672b495 | ||
|
|
1905be8577 | ||
|
|
4726821e7d | ||
|
|
7ac37ddc1a | ||
|
|
3889742e06 | ||
|
|
6bf3706455 | ||
|
|
612ecaff6c | ||
|
|
a85364ecff | ||
|
|
c0af03c503 | ||
|
|
9b61e4793b | ||
|
|
75a19e74a0 | ||
|
|
21d7e72b0c | ||
|
|
05d555eae5 | ||
|
|
8e412c3eb3 | ||
|
|
80147a9ebc | ||
|
|
3f6a3e25f1 | ||
|
|
800cbeef9d | ||
|
|
574f6a976f | ||
|
|
030b360e57 | ||
|
|
b883714192 | ||
|
|
d556f48168 | ||
|
|
cd7cac0eec | ||
|
|
9b31f18470 | ||
|
|
42a194b3d7 | ||
|
|
6748a7125e | ||
|
|
c2b3f29f3b | ||
|
|
572a634d90 | ||
|
|
652606ffb0 | ||
|
|
803537c63e | ||
|
|
4648c2d9af | ||
|
|
edceb3e7e9 | ||
|
|
da6bddcd77 | ||
|
|
b11f43e903 | ||
|
|
ef218a4d2e | ||
|
|
b061f27e7a | ||
|
|
8e64d54ab1 | ||
|
|
56b40a80ac | ||
|
|
d359d8ecb4 | ||
|
|
2bc55d00bb | ||
|
|
d3cf564b71 | ||
|
|
4fb8b97084 | ||
|
|
32c5cceb1d | ||
|
|
f38c14d6b5 | ||
|
|
3070ca0bc4 | ||
|
|
0122b3f717 | ||
|
|
79678fd82f | ||
|
|
034ddfbafb | ||
|
|
aebd26d03a |
17
ChangeLog.md
17
ChangeLog.md
@@ -1,6 +1,23 @@
|
||||
## Changes from most recent to oldest
|
||||
|
||||
**25 Mar 2023 - wpferguson**
|
||||
* Added script_manager darktable shortcut integration
|
||||
* Moved filename/path/extension string functions to string library
|
||||
|
||||
**06 Mar 2023 - wpferguson - Added option to disable script_manager update check**
|
||||
|
||||
**12 Jan 2022 - wpferguson - Documented contrib/rename_images.lua**
|
||||
|
||||
**28 Dec 2021 - wpferguson - Replaced deprecated _which_ command with _command -v_ in lib/dtutils/file.lua**
|
||||
|
||||
**12 Dec 2021 - wpferguson**
|
||||
* Added deprecated function to library
|
||||
* Added deprecation warning to contrib/rename-tags.lua
|
||||
|
||||
**22 Oct 2021 - wpferguson for Volker Bödker - make sure sequence is 4 digits in rename_images.lua**
|
||||
|
||||
**31 Aug 2021 - wpferguson - remove styles hiding from AutoGrouper.lua**
|
||||
|
||||
**02 Jul 2021 - wpferguson - merged API-7.0.0-dev branch to master**
|
||||
* API-7.0.0 is darktable 3.6
|
||||
* breaking changes
|
||||
|
||||
38
README.md
38
README.md
@@ -34,36 +34,39 @@ These scripts are contributed by users. They are meant to have an "owner", i.e.
|
||||
|
||||
Name|Standalone|OS |Purpose
|
||||
----|:--------:|:---:|-------
|
||||
[AutoGrouper](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/AutoGrouper)|Yes|LMW|Group images together by time
|
||||
[AutoGrouper](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/autogrouper)|Yes|LMW|Group images together by time
|
||||
[autostyle](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/autostyle)|Yes|LMW|Automatically apply styles on import
|
||||
[clear_GPS](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/clear_GPS)|Yes|LMW|Reset GPS information for selected images
|
||||
[CollectHelper](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/CollectHelper)|Yes|LMW|Add buttons to selected images module to manipulate the collection
|
||||
change_group_leader|Yes|LMW|Change which image leads group
|
||||
[clear_GPS](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/clear_gps)|Yes|LMW|Reset GPS information for selected images
|
||||
[CollectHelper](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/collecthelper)|Yes|LMW|Add buttons to selected images module to manipulate the collection
|
||||
[copy_attach_detach_tags](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/copy_attach_detach_tags)|Yes|LMW|Copy and paste tags from/to images
|
||||
[cr2hdr](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/cr2hdr)|Yes|L|Process image created with Magic Lantern Dual ISO
|
||||
[enfuseAdvanced](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/enfuseAdvanced)|No|LMW|Merge multiple images into Dynamic Range Increase (DRI) or Depth From Focus (DFF) images
|
||||
[exportLUT](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/exportLUT)|Yes|LMW|Create a LUT from a style and export it
|
||||
[enfuseAdvanced](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/enfuseadvanced)|No|LMW|Merge multiple images into Dynamic Range Increase (DRI) or Depth From Focus (DFF) images
|
||||
[exportLUT](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/exportlut)|Yes|LMW|Create a LUT from a style and export it
|
||||
[ext_editor](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/ext_editor)|No|LW|Export pictures to collection and edit them with up to nine user-defined external editors
|
||||
[face_recognition](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/face_recognition)|No|LM|Identify and tag images using facial recognition
|
||||
[fujifilm_dynamic_range](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/fujifilm_dynamic_range)|No|LMW|Correct fujifilm exposure based on exposure bias camera setting
|
||||
[fujifilm_ratings](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/fujifilm_ratings)|No|LM|Support importing Fujifilm ratings
|
||||
[geoJSON_export](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/geoJSON_export)|No|L|Create a geo JSON script with thumbnails for use in ...
|
||||
[geoToolbox](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/geoToolbox)|No|LMW|A toolbox of geo functions
|
||||
[geoJSON_export](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/geojson_export)|No|L|Create a geo JSON script with thumbnails for use in ...
|
||||
[geoToolbox](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/geotoolbox)|No|LMW|A toolbox of geo functions
|
||||
[gimp](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/gimp)|No|LMW|Open an image in GIMP for editing and return the result
|
||||
[gpx_export](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/gpx_export)|No|LMW|Export a GPX track file from selected images GPS data
|
||||
[HDRMerge](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/HDRMerge)|No|LMW|Combine the selected images into an HDR DNG and return the result
|
||||
[HDRMerge](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/hdrmerge)|No|LMW|Combine the selected images into an HDR DNG and return the result
|
||||
[hugin](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/hugin)|No|LMW|Combine selected images into a panorama and return the result
|
||||
[image_stack](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/image_stack)|No|LMW|Combine a stack of images to remove noise or transient objects
|
||||
[image_time](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/image_time)|Yes|LMW|Adjust the EXIF image time
|
||||
[kml_export](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/kml_export)|No|L|Export photos with a KML file for usage in Google Earth
|
||||
[LabelsToTags](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/LabelsToTags)|Yes|LMW|Apply tags based on color labels and ratings
|
||||
[OpenInExplorer](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/OpenInExplorer)|No|LMW|Open the selected images in the system file manager
|
||||
[LabelsToTags](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/labelstotags)|Yes|LMW|Apply tags based on color labels and ratings
|
||||
[OpenInExplorer](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/openinexplorer)|No|LMW|Open the selected images in the system file manager
|
||||
[passport_guide](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/passport_guide)|Yes|LMW|Add passport cropping guide to darkroom crop tool
|
||||
[pdf_slideshow](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/pdf_slideshow)|No|LM|Export images to a PDF slideshow
|
||||
[photils](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/photils)|No|LM|Automatic tag suggestions for your images
|
||||
[quicktag](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/quicktag)|Yes|LMW|Create shortcuts for quickly applying tags
|
||||
[rate_group](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/rate_group)|Yes|LMW|Apply or remove a star rating from grouped images
|
||||
[rename_images](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/rename_images)|Yes|LMW|Rename single or multiple images
|
||||
[rename-tags](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/rename-tags)|Yes|LMW|Change a tag name
|
||||
[RL_out_sharp](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/RL_out_sharp)|No|LW|Output sharpening using GMic (Richardson-Lucy algorithm)
|
||||
[RL_out_sharp](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/rl_out_sharp)|No|LW|Output sharpening using GMic (Richardson-Lucy algorithm)
|
||||
[select_non_existing](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/select_non_existing)|Yes|LMW|Enable selection of non-existing images in the the currently worked on images
|
||||
[select_untagged](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/select_untagged)|Yes|LMW|Enable selection of untagged images
|
||||
[slideshowMusic](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/slideshowMusic)|No|L|Play music during a slideshow
|
||||
[transfer_hierarchy](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/contrib/transfer_hierarchy)|Yes|LMW|Image move/copy preserving directory hierarchy
|
||||
@@ -77,14 +80,14 @@ Name|Standalone|OS |Purpose
|
||||
----|:--------:|:---:|-------
|
||||
[api_version](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/api_version)|Yes|LMW|Print the current API version
|
||||
[darkroom_demo](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/darkroom_demo)|Yes|LMW|Demonstrate changing images in darkoom
|
||||
[gettextExample](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/gettextExample)|Yes|LM|How to use translation
|
||||
[gettextExample](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/gettextexample)|Yes|LM|How to use translation
|
||||
[hello_world](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/hello_world)|Yes|LMW|Prints hello world when darktable starts
|
||||
[lighttable_demo](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/lighttable_demo)|Yes|LMW|Demonstrate controlling lighttable mode, zoom, sorting and filtering
|
||||
[moduleExample](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/moduleExample)|Yes|LMW|How to create a lighttable module
|
||||
[moduleExample](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/moduleexample)|Yes|LMW|How to create a lighttable module
|
||||
[multi_os](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/multi_os)|No|LMW|How to create a cross platform script that calls an external executable
|
||||
[panels_demo](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/panels_demo)|Yes|LMW|Demonstrate hiding and showing darktable panels
|
||||
[preferenceExamples](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/preferenceExamples)|Yes|LMW|How to use preferences in a script
|
||||
[printExamples](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/printExamples)|Yes|LMW|How to use various print functions from a script
|
||||
[preferenceExamples](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/preferenceexamples)|Yes|LMW|How to use preferences in a script
|
||||
[printExamples](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/printexamples)|Yes|LMW|How to use various print functions from a script
|
||||
[running_os](https://darktable-org.github.io/luadocs/lua.scripts.manual/scripts/examples/running_os)|Yes|LMW|Print out the running operating system
|
||||
|
||||
### Tools
|
||||
@@ -114,6 +117,7 @@ The following third-party projects are listed for information only. Think of thi
|
||||
* [arru/darktable-scripts](https://github.com/arru/darktable-scripts)
|
||||
* [nbremond77/darktable](https://github.com/nbremond77/darktable/tree/master/scripts)
|
||||
* [s5k6/dtscripts](https://github.com/s5k6/dtscripts)
|
||||
* [ChristianBirzer/darktable_extra_scripts](https://github.com/ChristianBirzer/darktable_extra_scripts)
|
||||
|
||||
## Download and Install
|
||||
|
||||
@@ -171,7 +175,7 @@ The recommended way to enable and disable specific scripts is using the script m
|
||||
|
||||
### Windows
|
||||
|
||||
echo "require 'tools/script_manager'" > %LOCALAPPDATA%\darktable\luarc
|
||||
echo require "tools/script_manager" > %LOCALAPPDATA%\darktable\luarc
|
||||
|
||||
### Snap
|
||||
|
||||
@@ -179,7 +183,7 @@ The recommended way to enable and disable specific scripts is using the script m
|
||||
|
||||
### Flatpak
|
||||
|
||||
echo require "tools/script_manager"' > ~/.var/app/org.darktable.Darktable/config/darktable/luarc
|
||||
echo 'require "tools/script_manager"' > ~/.var/app/org.darktable.Darktable/config/darktable/luarc
|
||||
|
||||
You can also create or add lines to the luarc file from the command line:
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local gettext = dt.gettext
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
@@ -215,4 +216,4 @@ script_data.destroy_method = "hide"
|
||||
script_data.restart = restart
|
||||
script_data.show = restart
|
||||
|
||||
return script_data
|
||||
return script_data
|
||||
|
||||
@@ -63,6 +63,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local function _(msgid)
|
||||
return gettext.dgettext("CollectHelper", msgid)
|
||||
|
||||
@@ -58,6 +58,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
|
||||
local mod = 'module_HDRMerge'
|
||||
|
||||
@@ -59,6 +59,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Lua 5.3 no longer has "unpack" but "table.unpack"
|
||||
unpack = unpack or table.unpack
|
||||
|
||||
@@ -63,6 +63,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("OpenInExplorer",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -72,6 +72,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- OS compatibility
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
@@ -49,6 +49,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- run command and retrieve stdout
|
||||
local function get_stdout(cmd)
|
||||
|
||||
201
contrib/change_group_leader.lua
Normal file
201
contrib/change_group_leader.lua
Normal file
@@ -0,0 +1,201 @@
|
||||
--[[
|
||||
change group leader
|
||||
|
||||
copyright (c) 2020, 2022 Bill Ferguson <wpferguson@gmail.com>
|
||||
copyright (c) 2021 Angel Angelov
|
||||
|
||||
darktable is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
darktable is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with darktable. If not, see <http://www.gnu.org/licenses/>.
|
||||
]]
|
||||
|
||||
--[[
|
||||
CHANGE GROUP LEADER
|
||||
automatically change the leader of raw+jpg paired image groups
|
||||
|
||||
INSTALLATION
|
||||
* copy this file in $CONFIGDIR/lua/ where CONFIGDIR is your darktable configuration directory
|
||||
* add the following line in the file $CONFIGDIR/luarc
|
||||
require "change_group_leader"
|
||||
|
||||
USAGE
|
||||
* in lighttable mode, select the image groups you wish to process,
|
||||
select whether you want to set the leader to "jpg" or "raw",
|
||||
and click "Execute"
|
||||
]]
|
||||
|
||||
local dt = require "darktable"
|
||||
local du = require "lib/dtutils"
|
||||
|
||||
local gettext = dt.gettext
|
||||
|
||||
local MODULE = "change_group_leader"
|
||||
|
||||
du.check_min_api_version("3.0.0", MODULE)
|
||||
|
||||
-- return data structure for script_manager
|
||||
|
||||
local script_data = {}
|
||||
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain(MODULE, dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
local function _(msgid)
|
||||
return gettext.dgettext(MODULE, msgid)
|
||||
end
|
||||
|
||||
-- create a namespace to contain persistent data and widgets
|
||||
chg_grp_ldr = {}
|
||||
|
||||
local cgl = chg_grp_ldr
|
||||
|
||||
cgl.widgets = {}
|
||||
|
||||
cgl.event_registered = false
|
||||
cgl.module_installed = false
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- F U N C T I O N S
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
local function install_module()
|
||||
if not cgl.module_installed then
|
||||
dt.register_lib(
|
||||
MODULE, -- Module name
|
||||
_("change_group_leader"), -- Visible name
|
||||
true, -- expandable
|
||||
false, -- resetable
|
||||
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_RIGHT_CENTER", 700}}, -- containers
|
||||
cgl.widgets.box,
|
||||
nil,-- view_enter
|
||||
nil -- view_leave
|
||||
)
|
||||
cgl.module_installed = true
|
||||
end
|
||||
end
|
||||
|
||||
local function find_group_leader(images, mode)
|
||||
for _, img in ipairs(images) do
|
||||
dt.print_log("checking image " .. img.id .. " named " .. img.filename)
|
||||
local found = false
|
||||
if mode == "jpg" then
|
||||
if string.match(string.lower(img.filename), "jpg$") then
|
||||
dt.print_log("jpg matched image " .. img.filename)
|
||||
found = true
|
||||
end
|
||||
elseif mode == "raw" then
|
||||
if img.is_raw and img.duplicate_index == 0 then
|
||||
dt.print_log("found raw " .. img.filename)
|
||||
found = true
|
||||
end
|
||||
elseif mode == "non-raw" then
|
||||
if img.is_ldr then
|
||||
dt.print_log("found ldr " .. img.filename)
|
||||
found = true
|
||||
end
|
||||
else
|
||||
dt.print_error(MODULE .. ": unrecognized mode " .. mode)
|
||||
return
|
||||
end
|
||||
if found then
|
||||
dt.print_log("making " .. img.filename .. " group leader")
|
||||
img:make_group_leader()
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local function process_image_groups(images)
|
||||
if #images < 1 then
|
||||
dt.print(_("No images selected."))
|
||||
dt.print_log(MODULE .. "no images seletected, returning...")
|
||||
else
|
||||
local mode = cgl.widgets.mode.value
|
||||
for _,img in ipairs(images) do
|
||||
dt.print_log("checking image " .. img.id)
|
||||
local group_images = img:get_group_members()
|
||||
if group_images == 1 then
|
||||
dt.print_log("only one image in group for image " .. image.id)
|
||||
else
|
||||
find_group_leader(group_images, mode)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- S C R I P T M A N A G E R I N T E G R A T I O N
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
local function destroy()
|
||||
dt.gui.libs[MODULE].visible = false
|
||||
end
|
||||
|
||||
local function restart()
|
||||
dt.gui.libs[MODULE].visible = true
|
||||
end
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- W I D G E T S
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
cgl.widgets.mode = dt.new_widget("combobox"){
|
||||
label = _("select new group leader"),
|
||||
tooltip = _("select type of image to be group leader"),
|
||||
selected = 1,
|
||||
"jpg", "raw", "non-raw",
|
||||
}
|
||||
|
||||
cgl.widgets.execute = dt.new_widget("button"){
|
||||
label = _("Execute"),
|
||||
clicked_callback = function()
|
||||
process_image_groups(dt.gui.action_images)
|
||||
end
|
||||
}
|
||||
|
||||
cgl.widgets.box = dt.new_widget("box"){
|
||||
orientation = "vertical",
|
||||
cgl.widgets.mode,
|
||||
cgl.widgets.execute,
|
||||
}
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- D A R K T A B L E I N T E G R A T I O N
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
if dt.gui.current_view().id == "lighttable" then
|
||||
install_module()
|
||||
else
|
||||
if not cgl.event_registered then
|
||||
dt.register_event(
|
||||
"view-changed",
|
||||
function(event, old_view, new_view)
|
||||
if new_view.name == "lighttable" and old_view.name == "darkroom" then
|
||||
install_module()
|
||||
end
|
||||
end
|
||||
)
|
||||
cgl.event_registered = true
|
||||
end
|
||||
end
|
||||
|
||||
script_data.destroy = destroy
|
||||
script_data.restart = restart
|
||||
script_data.destroy_method = "hide"
|
||||
script_data.show = restart
|
||||
|
||||
return script_data
|
||||
@@ -46,6 +46,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
local gettext = dt.gettext
|
||||
|
||||
|
||||
@@ -51,6 +51,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("copy_attach_detach_tags",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -44,6 +44,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local queue = {}
|
||||
local processed_files = {}
|
||||
|
||||
@@ -74,6 +74,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
local gettext = dt.gettext
|
||||
|
||||
@@ -40,6 +40,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local gettext = dt.gettext
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- OS compatibility
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
@@ -61,6 +61,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- namespace
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
Compensate for Fujifilm raw files made using "dynamic range".
|
||||
|
||||
Copyright (C) 2021 Dan Torop <dant@pnym.net>
|
||||
Copyright (C) 2021, 2022 Dan Torop <dant@pnym.net>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -70,6 +70,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local function detect_dynamic_range(event, image)
|
||||
if image.exif_maker ~= "FUJIFILM" then
|
||||
@@ -116,6 +117,11 @@ local function destroy()
|
||||
dt.destroy_event("fujifilm_dr", "post-import-image")
|
||||
end
|
||||
|
||||
if not df.check_if_bin_exists("exiftool") then
|
||||
dt.print_log("Please install exiftool to use fujifilm_dynamic_range")
|
||||
error "[fujifilm_dynamic_range] exiftool not found"
|
||||
end
|
||||
|
||||
dt.register_event("fujifilm_dr", "post-import-image",
|
||||
detect_dynamic_range)
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
gettext.bindtextdomain("fujifilm_ratings", dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("geoJSON_export",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -39,6 +39,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("geoToolbox",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -81,6 +81,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("gimp",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -36,6 +36,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("gpx_export",dt.configuration.config_dir.."/lua/locale/")
|
||||
@@ -203,5 +204,6 @@ end
|
||||
script_data.destroy = destroy
|
||||
script_data.restart = restart
|
||||
script_data.destroy_method = "hide"
|
||||
script_data.show = restart
|
||||
|
||||
return script_data
|
||||
|
||||
@@ -63,6 +63,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("hugin",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -80,6 +80,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("image_stack",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -122,6 +122,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
|
||||
@@ -52,6 +52,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("kml_export",dt.configuration.config_dir.."/lua/locale/")
|
||||
@@ -334,7 +335,7 @@ local defaultDir = ''
|
||||
if dt.configuration.running_os == "windows" then
|
||||
defaultDir = os.getenv("USERPROFILE")
|
||||
elseif dt.configuration.running_os == "macos" then
|
||||
defaultDir = os.getenv("home")
|
||||
defaultDir = os.getenv("HOME")
|
||||
else
|
||||
local handle = io.popen("xdg-user-dir DESKTOP")
|
||||
defaultDir = handle:read()
|
||||
|
||||
@@ -65,6 +65,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
dt.preferences.register
|
||||
("pdf_slideshow","open with","string",
|
||||
|
||||
@@ -51,6 +51,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
@@ -51,6 +51,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local function apply_rating(rating)
|
||||
local images = dt.gui.action_images
|
||||
|
||||
@@ -34,6 +34,7 @@ local debug = require "darktable.debug"
|
||||
|
||||
-- check API version
|
||||
du.check_min_api_version("7.0.0", "rename-tags")
|
||||
du.deprecated("contrib/rename-tags.lua","darktable release 4.0")
|
||||
|
||||
-- return data structure for script_manager
|
||||
|
||||
@@ -42,6 +43,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local rt = {}
|
||||
rt.module_installed = false
|
||||
|
||||
@@ -75,6 +75,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
77
contrib/select_non_existing.lua
Normal file
77
contrib/select_non_existing.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
--[[
|
||||
This file is part of darktable,
|
||||
copyright (c) 2023 Dirk Dittmar
|
||||
|
||||
darktable is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
darktable is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with darktable. If not, see <http://www.gnu.org/licenses/>.
|
||||
]]
|
||||
--[[
|
||||
Enable selection of non-existing images in the the currently worked on images, e.g. the ones selected by the collection module.
|
||||
]]
|
||||
|
||||
local dt = require "darktable"
|
||||
local du = require "lib/dtutils"
|
||||
local df = require "lib/dtutils.file"
|
||||
|
||||
-- module name
|
||||
local MODULE = "select_non_existing"
|
||||
|
||||
du.check_min_api_version("9.1.0", MODULE)
|
||||
|
||||
-- figure out the path separator
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
local gettext = dt.gettext
|
||||
gettext.bindtextdomain(MODULE, dt.configuration.config_dir..PS.."lua"..PS.."locale"..PS)
|
||||
|
||||
local function _(msgid)
|
||||
return gettext.dgettext(MODULE, msgid)
|
||||
end
|
||||
|
||||
local function stop_job(job)
|
||||
job.valid = false
|
||||
end
|
||||
|
||||
local function select_nonexisting_images(event, images)
|
||||
local selection = {}
|
||||
|
||||
local job = dt.gui.create_job(_("select non existing images"), true, stop_job)
|
||||
for key,image in ipairs(images) do
|
||||
if(job.valid) then
|
||||
job.percent = (key - 1)/#images
|
||||
local filepath = image.path..PS..image.filename
|
||||
local file_exists = df.test_file(filepath, "e")
|
||||
dt.print_log(filepath.." exists? => "..tostring(file_exists))
|
||||
if (not file_exists) then
|
||||
table.insert(selection, image)
|
||||
end
|
||||
else
|
||||
break
|
||||
end
|
||||
end
|
||||
stop_job(job)
|
||||
|
||||
return selection
|
||||
end
|
||||
|
||||
local function destroy()
|
||||
dt.gui.libs.select.destroy_selection(MODULE)
|
||||
end
|
||||
|
||||
dt.gui.libs.select.register_selection(
|
||||
MODULE,
|
||||
_("select non existing"),
|
||||
select_nonexisting_images,
|
||||
_("select all non-existing images in the current images"))
|
||||
|
||||
local script_data = {}
|
||||
script_data.destroy = destroy
|
||||
return script_data
|
||||
@@ -31,6 +31,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("select_untagged",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -38,6 +38,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("slideshowMusic",dt.configuration.config_dir.."/lua/locale/")
|
||||
|
||||
@@ -87,6 +87,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local MKDIR_COMMAND = darktable.configuration.running_os == "windows" and "mkdir " or "mkdir -p "
|
||||
local PATH_SEPARATOR = darktable.configuration.running_os == "windows" and "\\\\" or "/"
|
||||
|
||||
@@ -48,6 +48,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
local MODULE_NAME = "video_ffmpeg"
|
||||
|
||||
@@ -285,7 +286,7 @@ local defaultVideoDir = ''
|
||||
if dt.configuration.running_os == "windows" then
|
||||
defaultVideoDir = os.getenv("USERPROFILE")..PS .."videos"
|
||||
elseif dt.configuration.running_os == "macos" then
|
||||
defaultVideoDir = os.getenv("home")..PS.."Videos"
|
||||
defaultVideoDir = os.getenv("HOME")..PS.."Videos"
|
||||
else
|
||||
local handle = io.popen("xdg-user-dir VIDEOS")
|
||||
defaultVideoDir = handle:read()
|
||||
|
||||
@@ -42,6 +42,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet, otherwise leave as nil
|
||||
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
|
||||
|
||||
-- translation
|
||||
|
||||
|
||||
150
examples/x-touch.lua
Normal file
150
examples/x-touch.lua
Normal file
@@ -0,0 +1,150 @@
|
||||
--[[
|
||||
This file is part of darktable,
|
||||
copyright (c) 2023 Diederik ter Rahe
|
||||
|
||||
darktable is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
darktable is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with darktable. If not, see <http://www.gnu.org/licenses/>.
|
||||
]]
|
||||
--[[
|
||||
X-Touch Mini flexible encoder shortcuts
|
||||
|
||||
This script will create virtual sliders that are mapped dynamically to
|
||||
the most relevant sliders for the currently focused processing module.
|
||||
Tailored modules are color zones, tone equalizer, color calibration and
|
||||
mask manager properties. The script can easily be amended for other
|
||||
devices or personal preferences. Virtual "toggle" buttons can be created
|
||||
as well, that dynamically change meaning depending on current status.
|
||||
|
||||
USAGE
|
||||
* require this script from your main lua file
|
||||
* restart darktable
|
||||
* create shortcuts for each of the encoders on the x-touch mini
|
||||
to a virtual slider under lua/x-touch
|
||||
or import the following shortcutsrc file in the shortcuts dialog/preferences tab:
|
||||
|
||||
None;midi:CC1=lua/x-touch/knob 1
|
||||
None;midi:CC2=lua/x-touch/knob 2
|
||||
None;midi:CC3=lua/x-touch/knob 3
|
||||
None;midi:CC4=lua/x-touch/knob 4
|
||||
None;midi:CC5=lua/x-touch/knob 5
|
||||
None;midi:CC6=lua/x-touch/knob 6
|
||||
None;midi:CC7=lua/x-touch/knob 7
|
||||
None;midi:CC8=lua/x-touch/knob 8
|
||||
midi:E0=global/modifiers
|
||||
midi:F0=global/modifiers;ctrl
|
||||
midi:F#0=global/modifiers;alt
|
||||
midi:G#-1=iop/blend/tools/show and edit mask elements
|
||||
midi:A-1=iop/colorzones;focus
|
||||
midi:A#-1=iop/toneequal;focus
|
||||
midi:B-1=iop/colorbalancergb;focus
|
||||
midi:C0=iop/channelmixerrgb;focus
|
||||
]]
|
||||
|
||||
local dt = require "darktable"
|
||||
local du = require "lib/dtutils"
|
||||
|
||||
du.check_min_api_version("9.1.0", "x-touch")
|
||||
|
||||
-- set up 8 mimic sliders with the same function
|
||||
for k = 1,8 do
|
||||
dt.gui.mimic("slider", "knob ".. k,
|
||||
function(action, element, effect, size)
|
||||
-- take the number from the mimic name
|
||||
local k = tonumber(action:sub(-1))
|
||||
|
||||
-- only operate in darkroom; return NAN otherwise
|
||||
if dt.gui.current_view() ~= dt.gui.views.darkroom then
|
||||
return 0/0
|
||||
end
|
||||
|
||||
local maskval = 0/0
|
||||
if k < 8 then
|
||||
-- first try if the mask slider at that position is active
|
||||
local s = { "opacity",
|
||||
"size",
|
||||
"feather",
|
||||
"hardness",
|
||||
"rotation",
|
||||
"curvature",
|
||||
"compression" }
|
||||
maskval = dt.gui.action("lib/masks/properties/" .. s[k],
|
||||
element, effect, size)
|
||||
end
|
||||
-- if a value different from NAN is returned, the slider was active
|
||||
if maskval == maskval then
|
||||
return maskval
|
||||
|
||||
-- try if colorzones module is focused; if so select element of graph
|
||||
elseif dt.gui.action("iop/colorzones", "focus") ~= 0 then
|
||||
which = "iop/colorzones/graph"
|
||||
local e = { "red",
|
||||
"orange",
|
||||
"yellow",
|
||||
"green",
|
||||
"aqua",
|
||||
"blue",
|
||||
"purple",
|
||||
"magenta" }
|
||||
element = e[k]
|
||||
|
||||
-- if the tone equalizer is focused,
|
||||
-- select one of the sliders in the "simple" tab
|
||||
elseif dt.gui.action("iop/toneequal", "focus") ~= 0 then
|
||||
which ="iop/toneequal/simple/"..(k-9).." EV"
|
||||
|
||||
-- if color calibration is focused,
|
||||
-- the last 4 knobs are sent there
|
||||
elseif dt.gui.action("iop/channelmixerrgb", "focus") ~= 0
|
||||
and k >= 5 then
|
||||
-- knob 5 selects the active tab; pressing it resets to CAT
|
||||
if k == 5 then
|
||||
which = "iop/channelmixerrgb/page"
|
||||
element = "CAT"
|
||||
-- since the tab action is not a slider,
|
||||
-- the effects need to be translated
|
||||
if effect == "up" then effect = "next"
|
||||
elseif effect == "down" then effect = "previous"
|
||||
else effect = "activate"
|
||||
end
|
||||
else
|
||||
-- knobs 6, 7 and 8 are for the three color sliders on each tab
|
||||
which = "iop/focus/sliders"
|
||||
local e = { "1st",
|
||||
"2nd",
|
||||
"3rd" }
|
||||
element = e[k - 5]
|
||||
end
|
||||
|
||||
-- the 4th knob is contrast;
|
||||
-- either colorbalance if it is focused, or filmic
|
||||
elseif dt.gui.action("iop/colorbalancergb", "focus") ~= 0
|
||||
and k == 4 then
|
||||
which = "iop/colorbalancergb/contrast"
|
||||
|
||||
-- in all other cases use a default selection
|
||||
else
|
||||
local s = { "iop/exposure/exposure",
|
||||
"iop/filmicrgb/white relative exposure",
|
||||
"iop/filmicrgb/black relative exposure",
|
||||
"iop/filmicrgb/contrast",
|
||||
"iop/crop/left",
|
||||
"iop/crop/right",
|
||||
"iop/crop/top",
|
||||
"iop/crop/bottom" }
|
||||
which = s[k]
|
||||
end
|
||||
|
||||
-- now pass the element/effect/size to the selected slider
|
||||
return dt.gui.action(which, element, effect, size)
|
||||
end)
|
||||
end
|
||||
@@ -65,10 +65,47 @@ function dtutils.check_min_api_version(min_api, script_name)
|
||||
dt.print_error("This application is written for lua api version " .. min_api .. " or later.")
|
||||
dt.print_error("The current lua api version is " .. current_api)
|
||||
dt.print("ERROR: " .. script_name .. " failed to load. Lua API version " .. min_api .. " or later required.")
|
||||
dt.control.sleep(2000) -- allow time for the error to display before script_manager writes it's error message
|
||||
error("Minimum API " .. min_api .. " not met for " .. script_name .. ".", 0)
|
||||
end
|
||||
end
|
||||
|
||||
dtutils.libdoc.functions["check_max_api_version"] = {
|
||||
Name = [[check_max_api_version]],
|
||||
Synopsis = [[check the maximum required api version against the current api version]],
|
||||
Usage = [[local du = require "lib/dtutils"
|
||||
|
||||
local result = du.check_max_api_version(max_api, script_name)
|
||||
max_api - string - the api version that the application was written for (example: "5.0.0")
|
||||
script_name - string - the name of the script]],
|
||||
Description = [[check_max_api_version compares the maximum api required for the appllication to
|
||||
run against the current api version. This function is used when a part of the Lua API that
|
||||
the script relies on is removed. If the maximum api version is not met, then an
|
||||
error message is printed saying the script_name failed to load, then an error is thrown causing the
|
||||
program to stop executing.
|
||||
|
||||
Return_Value = [[result - true if the maximum api version is available, false if not.]],
|
||||
Limitations = [[When using the default handler on a script being executed from the luarc file, the error thrown
|
||||
will stop the luarc file from executing any remaining statements. This limitation does not apply to script_manger.]],
|
||||
Example = [[check_max_api_version("9.0.0") does nothing if the api is less than or equal to 9.0.0 otherwise an
|
||||
error message is printed and an error is thrown stopping execution of the script.]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils.check_max_api_version(max_api, script_name)
|
||||
local current_api = dt.configuration.api_version_string
|
||||
if current_api > max_api then
|
||||
dt.print_error("This application is written for lua api version " .. max_api .. " or earlier.")
|
||||
dt.print_error("The current lua api version is " .. current_api)
|
||||
dt.print("ERROR: " .. script_name .. " failed to load. Lua API version " .. max_api .. " or earlier required.")
|
||||
dt.control.sleep(2000) -- allow time for the error to display before script_manager writes it's error message
|
||||
error("Maximum API " .. max_api .. " not met for " .. script_name .. ".", 0)
|
||||
end
|
||||
end
|
||||
|
||||
dtutils.libdoc.functions["split"] = {
|
||||
Name = [[split]],
|
||||
Synopsis = [[split a string on a specified separator]],
|
||||
@@ -184,7 +221,8 @@ function dtutils.prequire(req_name)
|
||||
if status then
|
||||
log.msg(log.info, "Loaded " .. req_name)
|
||||
else
|
||||
log.msg(log.info, "Error loading " .. req_name)
|
||||
log.msg(log.error, "Error loading " .. req_name)
|
||||
log.msg(log.error, "Error returned is " .. lib)
|
||||
end
|
||||
return status, lib
|
||||
end
|
||||
@@ -330,4 +368,29 @@ function dtutils.find_image_by_id(imgid)
|
||||
end
|
||||
end
|
||||
|
||||
dtutils.libdoc.functions["deprecated"] = {
|
||||
Name = [[deprecated]],
|
||||
Synopsis = [[print deprecation warning]],
|
||||
Usage = [[local du = require "lib/dtutils"
|
||||
|
||||
du.deprecated(script_name, removal_string)
|
||||
script_name - name of the script being deprecated
|
||||
removal_strubg - a string explaining when the script will be removed]],
|
||||
Description = [[deprecated prints an error message saying the script is deprecated and when it will be removed]],
|
||||
Return_Value = [[]],
|
||||
Limitations = [[]],
|
||||
Example = [[local du = require "lib/dtutils"
|
||||
du.deprecated("contrib/rename-tags.lua", "darktable release 4.0")]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils.deprecated(script_name, removal_string)
|
||||
dt.print_toast("WARNING: " .. script_name .. " is deprecated and will be removed in " .. removal_string)
|
||||
dt.print_error("WARNING: " .. script_name .. " is deprecated and will be removed in " .. removal_string)
|
||||
end
|
||||
|
||||
|
||||
return dtutils
|
||||
|
||||
@@ -191,7 +191,7 @@ end
|
||||
|
||||
local function _search_for_bin_nix(bin)
|
||||
local result = false
|
||||
local p = io.popen("which " .. bin)
|
||||
local p = io.popen("command -v " .. bin)
|
||||
local output = p:read("*a")
|
||||
p:close()
|
||||
if string.len(output) > 0 then
|
||||
@@ -394,125 +394,32 @@ function dtutils_file.check_if_bin_exists(bin)
|
||||
return result
|
||||
end
|
||||
|
||||
dtutils_file.libdoc.functions["split_filepath"] = {
|
||||
Name = [[split_filepath]],
|
||||
Synopsis = [[split a filepath into parts]],
|
||||
Usage = [[local df = require "lib/dtutils.file"
|
||||
-- the following path, filename, etc functions have
|
||||
-- moved to the string library since they are string
|
||||
-- manipulation functions, and to prevent circular
|
||||
-- library inclusiion.
|
||||
|
||||
local result = df.split_filepath(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[split_filepath splits a filepath into the path, filename, basename and filetype and puts
|
||||
that in a table]],
|
||||
Return_Value = [[result - table - a table containing the path, filename, basename, and filetype]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
-- these functions are left here for compatibility
|
||||
-- with older scripts
|
||||
|
||||
function dtutils_file.split_filepath(str)
|
||||
-- strip out single quotes from quoted pathnames
|
||||
str = string.gsub(str, "'", "")
|
||||
str = string.gsub(str, '"', '')
|
||||
local result = {}
|
||||
-- Thank you Tobias Jakobs for the awesome regular expression, which I tweaked a little
|
||||
result["path"], result["filename"], result["basename"], result["filetype"] = string.match(str, "(.-)(([^\\/]-)%.?([^%.\\/]*))$")
|
||||
if result["basename"] == "" and result["filetype"]:len() > 1 then
|
||||
result["basename"] = result["filetype"]
|
||||
result["filetype"] = ""
|
||||
end
|
||||
return result
|
||||
return ds.split_filepath(str)
|
||||
end
|
||||
|
||||
dtutils_file.libdoc.functions["get_path"] = {
|
||||
Name = [[get_path]],
|
||||
Synopsis = [[get the path from a file path]],
|
||||
Usage = [[local df = require "lib/dtutils.file"
|
||||
|
||||
local result = df.get_path(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_path strips the filename and filetype from a path and returns the path]],
|
||||
Return_Value = [[result - string - the path]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_file.get_path(str)
|
||||
local parts = dtutils_file.split_filepath(str)
|
||||
return parts["path"]
|
||||
return ds.get_path(str)
|
||||
end
|
||||
|
||||
dtutils_file.libdoc.functions["get_filename"] = {
|
||||
Name = [[get_filename]],
|
||||
Synopsis = [[get the filename and extension from a file path]],
|
||||
Usage = [[local df = require "lib/dtutils.file"
|
||||
|
||||
local result = df.get_filename(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_filename strips the path from a filepath and returns the filename]],
|
||||
Return_Value = [[result - string - the file name and type]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_file.get_filename(str)
|
||||
local parts = dtutils_file.split_filepath(str)
|
||||
return parts["filename"]
|
||||
return ds.get_filename(str)
|
||||
end
|
||||
|
||||
dtutils_file.libdoc.functions["get_basename"] = {
|
||||
Name = [[get_basename]],
|
||||
Synopsis = [[get the filename without the path or extension]],
|
||||
Usage = [[local df = require "lib/dtutils.file"
|
||||
|
||||
local result = df.get_basename(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_basename returns the name of the file without the path or filetype
|
||||
]],
|
||||
Return_Value = [[result - string - the basename of the file]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_file.get_basename(str)
|
||||
local parts = dtutils_file.split_filepath(str)
|
||||
return parts["basename"]
|
||||
return ds.get_basename(str)
|
||||
end
|
||||
|
||||
dtutils_file.libdoc.functions["get_filetype"] = {
|
||||
Name = [[get_filetype]],
|
||||
Synopsis = [[get the filetype from a filename]],
|
||||
Usage = [[local df = require "lib/dtutils.file"
|
||||
|
||||
local result = df.get_filetype(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_filetype returns the filetype from the supplied filepath]],
|
||||
Return_Value = [[result - string - the filetype]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_file.get_filetype(str)
|
||||
local parts = dtutils_file.split_filepath(str)
|
||||
return parts["filetype"]
|
||||
return ds.get_filetype(str)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -294,6 +294,127 @@ function dtutils_string.sanitize_lua(str)
|
||||
return str
|
||||
end
|
||||
|
||||
dtutils_string.libdoc.functions["split_filepath"] = {
|
||||
Name = [[split_filepath]],
|
||||
Synopsis = [[split a filepath into parts]],
|
||||
Usage = [[local ds = require "lib/dtutils.string"
|
||||
|
||||
local result = ds.split_filepath(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[split_filepath splits a filepath into the path, filename, basename and filetype and puts
|
||||
that in a table]],
|
||||
Return_Value = [[result - table - a table containing the path, filename, basename, and filetype]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_string.split_filepath(str)
|
||||
-- strip out single quotes from quoted pathnames
|
||||
str = string.gsub(str, "'", "")
|
||||
str = string.gsub(str, '"', '')
|
||||
local result = {}
|
||||
-- Thank you Tobias Jakobs for the awesome regular expression, which I tweaked a little
|
||||
result["path"], result["filename"], result["basename"], result["filetype"] = string.match(str, "(.-)(([^\\/]-)%.?([^%.\\/]*))$")
|
||||
if result["basename"] == "" and result["filetype"]:len() > 1 then
|
||||
result["basename"] = result["filetype"]
|
||||
result["filetype"] = ""
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
dtutils_string.libdoc.functions["get_path"] = {
|
||||
Name = [[get_path]],
|
||||
Synopsis = [[get the path from a file path]],
|
||||
Usage = [[local ds = require "lib/dtutils.string"
|
||||
|
||||
local result = ds.get_path(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_path strips the filename and filetype from a path and returns the path]],
|
||||
Return_Value = [[result - string - the path]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_string.get_path(str)
|
||||
local parts = dtutils_string.split_filepath(str)
|
||||
return parts["path"]
|
||||
end
|
||||
|
||||
dtutils_string.libdoc.functions["get_filename"] = {
|
||||
Name = [[get_filename]],
|
||||
Synopsis = [[get the filename and extension from a file path]],
|
||||
Usage = [[local ds = require "lib/dtutils.string"
|
||||
|
||||
local result = ds.get_filename(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_filename strips the path from a filepath and returns the filename]],
|
||||
Return_Value = [[result - string - the file name and type]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_string.get_filename(str)
|
||||
local parts = dtutils_string.split_filepath(str)
|
||||
return parts["filename"]
|
||||
end
|
||||
|
||||
dtutils_string.libdoc.functions["get_basename"] = {
|
||||
Name = [[get_basename]],
|
||||
Synopsis = [[get the filename without the path or extension]],
|
||||
Usage = [[local ds = require "lib/dtutils.string"
|
||||
|
||||
local result = ds.get_basename(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_basename returns the name of the file without the path or filetype
|
||||
]],
|
||||
Return_Value = [[result - string - the basename of the file]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_string.get_basename(str)
|
||||
local parts = dtutils_string.split_filepath(str)
|
||||
return parts["basename"]
|
||||
end
|
||||
|
||||
dtutils_string.libdoc.functions["get_filetype"] = {
|
||||
Name = [[get_filetype]],
|
||||
Synopsis = [[get the filetype from a filename]],
|
||||
Usage = [[local ds = require "lib/dtutils.string"
|
||||
|
||||
local result = ds.get_filetype(filepath)
|
||||
filepath - string - path and filename]],
|
||||
Description = [[get_filetype returns the filetype from the supplied filepath]],
|
||||
Return_Value = [[result - string - the filetype]],
|
||||
Limitations = [[]],
|
||||
Example = [[]],
|
||||
See_Also = [[]],
|
||||
Reference = [[]],
|
||||
License = [[]],
|
||||
Copyright = [[]],
|
||||
}
|
||||
|
||||
function dtutils_string.get_filetype(str)
|
||||
local parts = dtutils_string.split_filepath(str)
|
||||
return parts["filetype"]
|
||||
end
|
||||
|
||||
|
||||
|
||||
return dtutils_string
|
||||
|
||||
12
locale/de_DE/LC_MESSAGES/select_non_existing.po
Normal file
12
locale/de_DE/LC_MESSAGES/select_non_existing.po
Normal file
@@ -0,0 +1,12 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
|
||||
msgid "select non existing images"
|
||||
msgstr "nicht vorhandene Bilder auswählen"
|
||||
|
||||
msgid "select non existing"
|
||||
msgstr "nicht vorhandene auswählen"
|
||||
|
||||
msgid "select all non-existing images in the current images"
|
||||
msgstr "alle nicht vorhandenen Bilder in den aktuellen Bildern auswählen"
|
||||
85
locale/fr_FR/LC_MESSAGES/OpenInExplorer.po
Normal file
85
locale/fr_FR/LC_MESSAGES/OpenInExplorer.po
Normal file
@@ -0,0 +1,85 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2022-06-27 17:22+0200\n"
|
||||
"PO-Revision-Date: 2022-06-27 17:36+0200\n"
|
||||
"Last-Translator: Manuel PINTOR <manu@lepassepartout.fr>\n"
|
||||
"Language-Team: \n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 2.3\n"
|
||||
"X-Poedit-Basepath: ../../../contrib\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Poedit-SearchPath-0: OpenInExplorer.lua\n"
|
||||
|
||||
#: OpenInExplorer.lua:79
|
||||
msgid ""
|
||||
"OpenInExplorer plug-in only supports Linux, macOS, and Windows at this time"
|
||||
msgstr ""
|
||||
"Le script OpenInExplorer ne fonctionne que sur Linux, macOS et Windows pour "
|
||||
"le moment"
|
||||
|
||||
#: OpenInExplorer.lua:95
|
||||
msgid ""
|
||||
"No links directory selected.\n"
|
||||
"Please check the dt preferences (lua options)"
|
||||
msgstr ""
|
||||
"Aucun répertoire de liens sélectionné.\n"
|
||||
"Voir dans les préférences dt > options lua"
|
||||
|
||||
#: OpenInExplorer.lua:99
|
||||
#, lua-format
|
||||
msgid ""
|
||||
"Links directory '%s' not found.\n"
|
||||
"Please check the dt preferences (lua options)"
|
||||
msgstr ""
|
||||
"Répertoire de liens '%s' inexistant.\n"
|
||||
"Voir dans les préférences dt > options lua"
|
||||
|
||||
#: OpenInExplorer.lua:156
|
||||
msgid "Failed to create links. Missing rights?"
|
||||
msgstr "Erreur de création de liens. Droits insuffisants ?"
|
||||
|
||||
#: OpenInExplorer.lua:172
|
||||
msgid "Please select an image"
|
||||
msgstr "Sélectionner une image SVP"
|
||||
|
||||
#: OpenInExplorer.lua:178
|
||||
msgid "Please select fewer images (max. 15)"
|
||||
msgstr "Sélectionner moins d'images SVP (max. 15)"
|
||||
|
||||
#: OpenInExplorer.lua:203
|
||||
msgid "show in file explorer"
|
||||
msgstr "afficher dans le gestionnaire de fichiers"
|
||||
|
||||
#: OpenInExplorer.lua:205
|
||||
msgid "Open the file manager at the selected image's location"
|
||||
msgstr "Ouvre le gestionnaire de fichiers à l'endroit de l'image sélectionnée"
|
||||
|
||||
#: OpenInExplorer.lua:212
|
||||
msgid "OpenInExplorer: linked files directory"
|
||||
msgstr "OpenInExplorer : répertoire des fichiers liés"
|
||||
|
||||
#: OpenInExplorer.lua:213
|
||||
msgid ""
|
||||
"Directory to store the links to the file names. Requires restart to take "
|
||||
"effect"
|
||||
msgstr ""
|
||||
"Répertoire dans lequel enregistrer les liens sur les fichiers. Nécessite un "
|
||||
"redémarrage de dt"
|
||||
|
||||
#: OpenInExplorer.lua:216
|
||||
msgid "Select directory"
|
||||
msgstr "Sélectionner un répertoire"
|
||||
|
||||
#: OpenInExplorer.lua:222
|
||||
msgid "OpenInExplorer: use links"
|
||||
msgstr "OpenInExplorer : utiliser des liens"
|
||||
|
||||
#: OpenInExplorer.lua:223
|
||||
msgid "Use links instead of multiple windows. Requires restart to take effect"
|
||||
msgstr ""
|
||||
"Utiliser des liens plutôt que de multiples fenêtres. Nécessite un "
|
||||
"redémarrage de dt"
|
||||
62
locale/it_IT/LC_MESSAGES/executable_manager.po
Normal file
62
locale/it_IT/LC_MESSAGES/executable_manager.po
Normal file
@@ -0,0 +1,62 @@
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
#
|
||||
# Maurizio Paglia <mpaglia0@gmail.com>, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-07-11 22:19+0200\n"
|
||||
"PO-Revision-Date: 2022-07-11 22:21+0200\n"
|
||||
"Last-Translator: Maurizio Paglia <mpaglia0@gmail.com>\n"
|
||||
"Language-Team: Italian <>\n"
|
||||
"Language: it\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Lokalize 21.12.3\n"
|
||||
|
||||
#: executable_manager.lua:144
|
||||
msgid "No executable paths found, exiting..."
|
||||
msgstr "Nessun percorso con eseguibili, esco..."
|
||||
|
||||
#: executable_manager.lua:160
|
||||
msgid "select an executable"
|
||||
msgstr "seleziona un eseguibile"
|
||||
|
||||
#: executable_manager.lua:160
|
||||
msgid "search path for executable"
|
||||
msgstr "cerca il percorso dell'eseguibile"
|
||||
|
||||
#: executable_manager.lua:169
|
||||
msgid "select "
|
||||
msgstr "seleziona"
|
||||
|
||||
#: executable_manager.lua:169
|
||||
msgid " executable"
|
||||
msgstr " eseguibile"
|
||||
|
||||
#: executable_manager.lua:190
|
||||
msgid "select executable to modify"
|
||||
msgstr "Seleziona l'eseguibile da modificare"
|
||||
|
||||
#: executable_manager.lua:205
|
||||
msgid "current"
|
||||
msgstr "Attuale"
|
||||
|
||||
#: executable_manager.lua:207
|
||||
msgid "select"
|
||||
msgstr "Seleziona"
|
||||
|
||||
#: executable_manager.lua:209
|
||||
msgid "reset"
|
||||
msgstr "Cancella"
|
||||
|
||||
#: executable_manager.lua:212
|
||||
msgid "Clear path for "
|
||||
msgstr "Cancella il percorso di "
|
||||
|
||||
#: executable_manager.lua:211
|
||||
msgid "clear"
|
||||
msgstr "Pulisci"
|
||||
190
locale/it_IT/LC_MESSAGES/script_manager.po
Normal file
190
locale/it_IT/LC_MESSAGES/script_manager.po
Normal file
@@ -0,0 +1,190 @@
|
||||
# French messages for script_manager.lua
|
||||
# Christophe Agathon <christophe.agathon@gmail.com>, 2020.
|
||||
# Maurizio Paglia <mpaglia0@gmail.com>, 2021, 2022.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"POT-Creation-Date: 2020-12-28 10:22+0100\n"
|
||||
"PO-Revision-Date: 2022-07-11 22:03+0200\n"
|
||||
"Last-Translator: Maurizio Paglia <mpaglia0@gmail.com>\n"
|
||||
"Language-Team: Italian <>\n"
|
||||
"Language: fr_FR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Lokalize 21.12.3\n"
|
||||
"X-Poedit-Basepath: ../../../tools\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||
"X-Poedit-KeywordsList: _\n"
|
||||
"X-Poedit-SearchPath-0: script_manager.lua\n"
|
||||
|
||||
#: script_manager.lua:190
|
||||
msgid "Cant read from "
|
||||
msgstr "Non posso leggere da "
|
||||
|
||||
#: script_manager.lua:204
|
||||
msgid "Loaded "
|
||||
msgstr "Script caricato "
|
||||
|
||||
#: script_manager.lua:207
|
||||
msgid " failed to load"
|
||||
msgstr "Non riesco a caricare lo script"
|
||||
|
||||
#: script_manager.lua:223
|
||||
msgid " will not start when darktable is restarted"
|
||||
msgstr " non verrà avviato al riavvio di darktable"
|
||||
|
||||
#: script_manager.lua:281 script_manager.lua:345
|
||||
msgid "find command is "
|
||||
msgstr "Il comando find è "
|
||||
|
||||
#: script_manager.lua:321
|
||||
msgid "lua scripts successfully updated"
|
||||
msgstr "Gli script lua sono stati correttamente aggiornati"
|
||||
|
||||
#: script_manager.lua:381
|
||||
msgid "category "
|
||||
msgstr "Categoria"
|
||||
|
||||
#: script_manager.lua:381
|
||||
msgid " is already in use. Please specify a different category name."
|
||||
msgstr " è già utilizzato. Prego specificare un nome differente."
|
||||
|
||||
#: script_manager.lua:410
|
||||
msgid "scripts successfully installed into category "
|
||||
msgstr "Gli script sono stati installati correttamente nella categoria "
|
||||
|
||||
#: script_manager.lua:426
|
||||
msgid "No scripts found to install"
|
||||
msgstr "Non trovo script da installare"
|
||||
|
||||
#: script_manager.lua:430
|
||||
msgid "failed to download scripts"
|
||||
msgstr "Non riesco a scaricare gli script"
|
||||
|
||||
# Peut-être que « activé » serait mieux, mais ce n'est pas la traduction de « started »
|
||||
#: script_manager.lua:458
|
||||
msgid " started"
|
||||
msgstr " avviato"
|
||||
|
||||
# Peut-être que « désactivé » serait mieux, mais ce n'est pas la traduction de « stopped »
|
||||
#: script_manager.lua:460
|
||||
msgid " stopped"
|
||||
msgstr " bloccato"
|
||||
|
||||
#: script_manager.lua:545
|
||||
msgid "Page "
|
||||
msgstr "Pag."
|
||||
|
||||
#: script_manager.lua:545
|
||||
msgid " of "
|
||||
msgstr " di "
|
||||
|
||||
#: script_manager.lua:674
|
||||
msgid "scripts to update"
|
||||
msgstr "Script da aggiornare"
|
||||
|
||||
#: script_manager.lua:675
|
||||
msgid "select the scripts installation to update"
|
||||
msgstr "Selezionare l'installazione di script da aggiornare"
|
||||
|
||||
#: script_manager.lua:684 script_manager.lua:742
|
||||
msgid "update scripts"
|
||||
msgstr "Aggiornare gli script"
|
||||
|
||||
#: script_manager.lua:685
|
||||
msgid "update the lua scripts from the repository"
|
||||
msgstr "Aggiornare gli script lua del repo"
|
||||
|
||||
#: script_manager.lua:696
|
||||
msgid ""
|
||||
"enter the URL of the git repository containing the scripts you wish to add"
|
||||
msgstr "Immettere l'URL del repo git che contiene gli script da aggiungere"
|
||||
|
||||
#: script_manager.lua:701
|
||||
msgid "name of new category"
|
||||
msgstr "Nome della nuova categoria"
|
||||
|
||||
#: script_manager.lua:702
|
||||
msgid "enter a category name for the additional scripts"
|
||||
msgstr "Immettere il nome della categoria per altri script"
|
||||
|
||||
#: script_manager.lua:707
|
||||
msgid "URL to download additional scripts from"
|
||||
msgstr "URL dal quale scaricare ulteriori script"
|
||||
|
||||
#: script_manager.lua:709
|
||||
msgid "new category to place scripts in"
|
||||
msgstr "Nuova categoria che dovrà contenere gli script"
|
||||
|
||||
#: script_manager.lua:712
|
||||
msgid "install additional scripts"
|
||||
msgstr "Installare gli script aggiuntivi"
|
||||
|
||||
#: script_manager.lua:720
|
||||
msgid "Enable \"Disable Scripts\" button"
|
||||
msgstr "Abilita il pulsante \"Disabilita Script\""
|
||||
|
||||
#: script_manager.lua:730
|
||||
msgid "Disable Scripts"
|
||||
msgstr "Disabilita Script"
|
||||
|
||||
#: script_manager.lua:736
|
||||
msgid "lua scripts will not run the next time darktable is started"
|
||||
msgstr "Gli script lua non verranno avviati al prossimo riavvio di darktable"
|
||||
|
||||
#: script_manager.lua:745
|
||||
msgid "add more scripts"
|
||||
msgstr "Aggiungi altri script"
|
||||
|
||||
#: script_manager.lua:747
|
||||
msgid "disable scripts"
|
||||
msgstr "Disabilita script"
|
||||
|
||||
#: script_manager.lua:755
|
||||
msgid "category"
|
||||
msgstr "categoria"
|
||||
|
||||
#: script_manager.lua:756
|
||||
msgid "select the script category"
|
||||
msgstr "Seleziona la categoria"
|
||||
|
||||
#: script_manager.lua:780
|
||||
msgid "Page:"
|
||||
msgstr "Pag.:"
|
||||
|
||||
#: script_manager.lua:808
|
||||
msgid "Scripts"
|
||||
msgstr "Scripts"
|
||||
|
||||
#: script_manager.lua:817
|
||||
msgid "scripts per page"
|
||||
msgstr "Script per pagina"
|
||||
|
||||
#: script_manager.lua:818
|
||||
msgid "select number of start/stop buttons to display"
|
||||
msgstr "Selezionare il numero di pulsanti da visualizzare"
|
||||
|
||||
#: script_manager.lua:829
|
||||
msgid "change number of buttons"
|
||||
msgstr "Modifica la quantità di pulsanti"
|
||||
|
||||
#: script_manager.lua:837
|
||||
msgid "Configuration"
|
||||
msgstr "Configurazione"
|
||||
|
||||
#: script_manager.lua:858
|
||||
msgid "action"
|
||||
msgstr "Azione"
|
||||
|
||||
#: script_manager.lua:864
|
||||
msgid "install/update scripts"
|
||||
msgstr "Installa/aggiorna script"
|
||||
|
||||
#: script_manager.lua:864
|
||||
msgid "configure"
|
||||
msgstr "Configura"
|
||||
|
||||
#: script_manager.lua:864
|
||||
msgid "start/stop scripts"
|
||||
msgstr "Avvia/blocca script"
|
||||
@@ -21,7 +21,7 @@ a simple script that will automatically look for newer releases on github and in
|
||||
when there is something. it will only check on startup and only once a week.
|
||||
|
||||
USAGE
|
||||
* install luasec and cjson for Lua 5.2 on your system
|
||||
* install luasec and cjson for Lua 5.4 on your system
|
||||
* require this script from your main lua file
|
||||
* restart darktable
|
||||
|
||||
@@ -41,6 +41,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
-- compare two version strings of the form "major.minor.patch"
|
||||
-- returns -1, 0, 1 if the first version is smaller, equal, greater than the second version,
|
||||
|
||||
@@ -38,6 +38,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
-- set this to "false" if you don't want to overwrite metadata fields
|
||||
-- (title, description, creator, publisher and rights) that are already set
|
||||
|
||||
@@ -40,6 +40,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
dt.preferences.register("delete_long_tags", "length", "integer",
|
||||
"maximum length of tags to keep",
|
||||
|
||||
@@ -44,6 +44,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
-- deleting while iterating the tags list seems to break the iterator!
|
||||
local unused_tags = {}
|
||||
|
||||
@@ -50,6 +50,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
-- Tell gettext where to find the .mo file translating messages for a particular domain
|
||||
gettext.bindtextdomain("enfuse",dt.configuration.config_dir..PS .. "lua" .. PS .. "locale" .. PS)
|
||||
|
||||
@@ -47,6 +47,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
dt.preferences.register("generate_image_txt",
|
||||
"enabled",
|
||||
|
||||
@@ -40,6 +40,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
local ipiu = {}
|
||||
ipiu.module_installed = false
|
||||
|
||||
@@ -45,6 +45,7 @@ local filter_dropdown = dt.new_widget("combobox")
|
||||
{
|
||||
label = "import filter",
|
||||
editable = false,
|
||||
tooltip = "import filters are applied after completion of the import dialog",
|
||||
|
||||
changed_callback = function(widget)
|
||||
dt.preferences.write("import_filter_manager", "active_filter", "string", widget.value)
|
||||
|
||||
@@ -45,6 +45,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
local buffer_count = 5
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
dt.preferences.register
|
||||
("selection_to_pdf","Open with","string",
|
||||
|
||||
@@ -41,6 +41,7 @@ local script_data = {}
|
||||
script_data.destroy = nil -- function to destory the script
|
||||
script_data.destroy_method = nil -- set to hide for libs since we can't destroy them commpletely yet
|
||||
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
|
||||
|
||||
local PS = dt.configuration.running_os == "windows" and "\\" or "/"
|
||||
|
||||
@@ -105,7 +106,7 @@ local function install_module()
|
||||
"executable manager", -- Visible name
|
||||
true, -- expandable
|
||||
false, -- resetable
|
||||
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_LEFT_BOTTOM", 100}}, -- containers
|
||||
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_LEFT_BOTTOM", 600}}, -- containers
|
||||
dt.new_widget("box") -- widget
|
||||
{
|
||||
orientation = "vertical",
|
||||
@@ -208,7 +209,7 @@ for i,exec in ipairs(exec_table) do
|
||||
executable_path_widgets[exec],
|
||||
dt.new_widget("section_label"){label = _("reset")},
|
||||
dt.new_widget("button"){
|
||||
label = "clear",
|
||||
label = _("clear"),
|
||||
tooltip = _("Clear path for ") .. exec,
|
||||
clicked_callback = function()
|
||||
df.set_executable_path_preference(exec, "")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--[[
|
||||
This file is part of darktable,
|
||||
copyright (c) 2018, 2020 Bill Ferguson <wpferguson@gmail.com>
|
||||
copyright (c) 2018, 2020, 2023 Bill Ferguson <wpferguson@gmail.com>
|
||||
|
||||
darktable is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -70,7 +70,6 @@ end
|
||||
|
||||
du.check_min_api_version("5.0.0", "script_manager")
|
||||
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- C O N S T A N T S
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@@ -94,6 +93,16 @@ local LUA_SCRIPT_REPO = "https://github.com/darktable-org/lua-scripts.git"
|
||||
|
||||
local LUA_API_VER = "API-" .. dt.configuration.api_version_string
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- P R E F E R E N C E S
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
dt.preferences.register(MODULE, "check_update", "bool",
|
||||
_("check for updated scripts on start up"),
|
||||
_("automatically update scripts to correct version"),
|
||||
true)
|
||||
|
||||
local check_for_updates = dt.preferences.read(MODULE, "check_update", "bool")
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- L O G L E V E L
|
||||
@@ -121,6 +130,10 @@ sm.event_registered = false
|
||||
sm.widgets = {}
|
||||
sm.categories = {}
|
||||
|
||||
-- set log level for functions
|
||||
|
||||
sm.log_level = DEFAULT_LOG_LEVEL
|
||||
|
||||
--[[
|
||||
|
||||
sm.scripts is a table of tables for containing the scripts
|
||||
@@ -150,6 +163,8 @@ sm.categories = {}
|
||||
storage_name name of the exporter (in the exporter storage menu)
|
||||
has_action true if it creates an action
|
||||
action_name name on the button
|
||||
has_select true if it creates a select
|
||||
select_name name on the button
|
||||
has_event true if it creates an event handler
|
||||
event_type type of event, shortcut, post-xxx, pre-xxx
|
||||
callback name of the callback routine
|
||||
@@ -181,22 +196,42 @@ sm.run = false
|
||||
-- F U N C T I O N S
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
-------------------
|
||||
-- helper functions
|
||||
-------------------
|
||||
|
||||
local function set_log_level(level)
|
||||
local old_log_level = log.log_level()
|
||||
log.log_level(level)
|
||||
return old_log_level
|
||||
end
|
||||
|
||||
local function restore_log_level(level)
|
||||
log.log_level(level)
|
||||
end
|
||||
|
||||
local function pref_read(name, pref_type)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.debug, "name is " .. name .. " and type is " .. pref_type)
|
||||
local val = dt.preferences.read(MODULE, name, pref_type)
|
||||
if not string.match(pref_type, "bool") then
|
||||
log.msg(log.debug, "read value " .. tostring(val))
|
||||
end
|
||||
log.msg(log.debug, "read value " .. tostring(val))
|
||||
restore_log_level(old_log_level)
|
||||
return val
|
||||
end
|
||||
|
||||
local function pref_write(name, pref_type, value)
|
||||
dt.preferences.write(MODULE, name, pref_type, value)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.debug, "writing value " .. tostring(value) .. " for name " .. name)
|
||||
dt.preferences.write(MODULE, name, pref_type, value)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
----------------
|
||||
-- git interface
|
||||
----------------
|
||||
|
||||
local function get_repo_status(repo)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local p = io.popen("cd " .. repo .. CS .. "git status")
|
||||
if p then
|
||||
local data = p:read("*a")
|
||||
@@ -204,10 +239,12 @@ local function get_repo_status(repo)
|
||||
return data
|
||||
end
|
||||
log.msg(log.error, "unable to get status of " .. repo)
|
||||
restore_log_level(old_log_level)
|
||||
return nil
|
||||
end
|
||||
|
||||
local function get_current_repo_branch(repo)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local branch = nil
|
||||
local p = io.popen("cd " .. repo .. CS .. "git branch --all")
|
||||
if p then
|
||||
@@ -226,10 +263,12 @@ local function get_current_repo_branch(repo)
|
||||
if not branch then
|
||||
log.msg(log.error, "no current branch detected in repo_data")
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
return nil
|
||||
end
|
||||
|
||||
local function get_repo_branches(repo)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local branches = {}
|
||||
local p = io.popen("cd " .. repo .. CS .. "git pull --all" .. CS .. "git branch --all")
|
||||
if p then
|
||||
@@ -246,11 +285,12 @@ local function get_repo_branches(repo)
|
||||
end
|
||||
end
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
return branches
|
||||
end
|
||||
|
||||
|
||||
local function is_repo_clean(repo_data)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
if string.match(repo_data, "\n%s-%a.-%a:%s-%a%g-\n") then
|
||||
log.msg(log.info, "repo is dirty")
|
||||
return false
|
||||
@@ -258,14 +298,22 @@ local function is_repo_clean(repo_data)
|
||||
log.msg(log.info, "repo is clean")
|
||||
return true
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function checkout_repo_branch(repo, branch)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.info, "checkout out branch " .. branch .. " from repository " .. repo)
|
||||
os.execute("cd " .. repo .. CS .. "git checkout " .. branch)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
--------------------
|
||||
-- utility functions
|
||||
--------------------
|
||||
|
||||
local function update_combobox_choices(combobox, choice_table, selected)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local items = #combobox
|
||||
local choices = #choice_table
|
||||
for i, name in ipairs(choice_table) do
|
||||
@@ -281,11 +329,14 @@ local function update_combobox_choices(combobox, choice_table, selected)
|
||||
end
|
||||
|
||||
combobox.value = selected
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function string_trim(str)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local result = string.gsub(str, "^%s+", "")
|
||||
result = string.gsub(result, "%s+$", "")
|
||||
restore_log_level(old_log_level)
|
||||
return result
|
||||
end
|
||||
|
||||
@@ -293,15 +344,22 @@ local function string_dequote(str)
|
||||
return string.gsub(str, "['\"]", "")
|
||||
end
|
||||
|
||||
------------------
|
||||
-- script handling
|
||||
------------------
|
||||
|
||||
local function add_script_category(category)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
if #sm.categories == 0 or not string.match(du.join(sm.categories, " "), ds.sanitize_lua(category)) then
|
||||
table.insert(sm.categories, category)
|
||||
sm.scripts[category] = {}
|
||||
log.msg(log.debug, "created category " .. category)
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function get_script_doc(script)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local description = nil
|
||||
f = io.open(LUA_DIR .. PS .. script .. ".lua")
|
||||
if f then
|
||||
@@ -314,19 +372,24 @@ local function get_script_doc(script)
|
||||
log.msg(log.error, _("Cant read from " .. script))
|
||||
end
|
||||
if description then
|
||||
restore_log_level(old_log_level)
|
||||
return description
|
||||
else
|
||||
restore_log_level(old_log_level)
|
||||
return "No documentation available"
|
||||
end
|
||||
end
|
||||
|
||||
local function activate(script)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local status = nil -- status of start function
|
||||
local err = nil -- error message returned if module doesn't start
|
||||
log.msg(log.info, "activating " .. script.name)
|
||||
if script.running == false then
|
||||
script_manager_running_script = script.name
|
||||
status, err = du.prequire(script.path)
|
||||
log.msg(log.debug, "prequire returned " .. tostring(status) .. " and for err " .. tostring(err))
|
||||
script_manager_running_script = nil
|
||||
if status then
|
||||
pref_write(script.script_name, "bool", true)
|
||||
log.msg(log.screen, _("Loaded ") .. script.script_name)
|
||||
@@ -334,7 +397,7 @@ local function activate(script)
|
||||
if err ~= true then
|
||||
log.msg(log.debug, "got lib data")
|
||||
script.data = err
|
||||
if script.data.destroy_method and script.data.destroy_method == "hide" then
|
||||
if script.data.destroy_method and script.data.destroy_method == "hide" and script.data.show then
|
||||
script.data.show()
|
||||
end
|
||||
else
|
||||
@@ -351,16 +414,20 @@ local function activate(script)
|
||||
status = true
|
||||
pref_write(script.script_name, "bool", true)
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
return status
|
||||
end
|
||||
|
||||
local function deactivate(script)
|
||||
-- presently the lua api doesn't support unloading gui elements however, we
|
||||
-- can hide libs, so we just mark those as hidden and hide the gui
|
||||
-- can delete storage
|
||||
--therefore we just mark then inactive for the next time darktable starts
|
||||
-- presently the lua api doesn't support unloading lib elements however, we
|
||||
-- can hide libs, so we just mark those as hidden and hide the gui
|
||||
-- can delete storages
|
||||
-- can delete actions
|
||||
-- can delete selects
|
||||
-- and mark them inactive for the next time darktable starts
|
||||
|
||||
-- deactivate it....
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
pref_write(script.script_name, "bool", false)
|
||||
if script.data then
|
||||
script.data.destroy()
|
||||
@@ -382,9 +449,11 @@ local function deactivate(script)
|
||||
log.msg(log.info, "setting " .. script.script_name .. " to not start")
|
||||
log.msg(log.screen, script.name .. _(" will not start when darktable is restarted"))
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function add_script_name(name, path, category)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.debug, "category is " .. category)
|
||||
log.msg(log.debug, "name is " .. name)
|
||||
local script = {
|
||||
@@ -398,10 +467,14 @@ local function add_script_name(name, path, category)
|
||||
table.insert(sm.scripts[category], script)
|
||||
if pref_read(script.script_name, "bool") then
|
||||
activate(script)
|
||||
else
|
||||
pref_write(script.script_name, "bool", false)
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function process_script_data(script_file)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
|
||||
-- the script file supplied is category/filename.filetype
|
||||
-- the following pattern splits the string into category, path, name, fileename, and filetype
|
||||
@@ -432,13 +505,15 @@ local function process_script_data(script_file)
|
||||
if name then
|
||||
add_script_name(name, path, category)
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function scan_scripts(script_dir)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local script_count = 0
|
||||
local find_cmd = "find -L " .. script_dir .. " -name \\*.lua -print | sort"
|
||||
if dt.configuration.running_os == "windows" then
|
||||
find_cmd = "dir /b/s " .. script_dir .. "\\*.lua | sort"
|
||||
find_cmd = "dir /b/s \"" .. script_dir .. "\\*.lua\" | sort"
|
||||
end
|
||||
log.msg(log.debug, _("find command is ") .. find_cmd)
|
||||
-- scan the scripts
|
||||
@@ -457,10 +532,12 @@ local function scan_scripts(script_dir)
|
||||
end
|
||||
end
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
return script_count
|
||||
end
|
||||
|
||||
local function update_scripts()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local result = false
|
||||
|
||||
local git = sm.executables.git
|
||||
@@ -483,10 +560,16 @@ local function update_scripts()
|
||||
dt.print(_("lua scripts successfully updated"))
|
||||
end
|
||||
|
||||
restore_log_level(old_log_level)
|
||||
return result
|
||||
end
|
||||
|
||||
--------------
|
||||
-- UI handling
|
||||
--------------
|
||||
|
||||
local function update_script_update_choices()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local installs = {}
|
||||
local pref_string = ""
|
||||
for i, repo in ipairs(sm.installed_repositories) do
|
||||
@@ -496,9 +579,11 @@ local function update_script_update_choices()
|
||||
update_combobox_choices(sm.widgets.update_script_choices, installs, 1)
|
||||
log.msg(log.debug, "repo pref string is " .. pref_string)
|
||||
pref_write("installed_repos", "string", pref_string)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function scan_repositories()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local script_count = 0
|
||||
local find_cmd = "find -L " .. LUA_DIR .. " -name \\*.git -print | sort"
|
||||
if dt.configuration.running_os == "windows" then
|
||||
@@ -533,15 +618,18 @@ local function scan_repositories()
|
||||
end
|
||||
end
|
||||
update_script_update_choices()
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function install_scripts()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local url = sm.widgets.script_url.text
|
||||
local category = sm.widgets.new_category.text
|
||||
|
||||
if string.match(du.join(sm.categories, " "), ds.sanitize_lua(category)) then
|
||||
log.msg(log.screen, _("category ") .. category .. _(" is already in use. Please specify a different category name."))
|
||||
log.msg(log.error, "category " .. category .. " already exists, returning...")
|
||||
restore_log_level(old_log_level)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -551,6 +639,7 @@ local function install_scripts()
|
||||
|
||||
if not git then
|
||||
dt.print(_("ERROR: git not found. Install or specify the location of the git executable."))
|
||||
restore_log_level(old_log_level)
|
||||
return
|
||||
end
|
||||
|
||||
@@ -592,28 +681,34 @@ local function install_scripts()
|
||||
dt.print(_("failed to download scripts"))
|
||||
end
|
||||
|
||||
restore_log_level(old_log_level)
|
||||
return result
|
||||
end
|
||||
|
||||
local function clear_button(number)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local button = sm.widgets.buttons[number]
|
||||
button.label = ""
|
||||
button.tooltip = ""
|
||||
button.sensitive = false
|
||||
--button.name = ""
|
||||
--button.name = ""
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function find_script(category, name)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.debug, "looking for script " .. name .. " in category " .. category)
|
||||
for _, script in ipairs(sm.scripts[category]) do
|
||||
if string.match(script.name, "^" .. ds.sanitize_lua(name) .. "$") then
|
||||
return script
|
||||
end
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
return nil
|
||||
end
|
||||
|
||||
local function populate_buttons(category, first, last)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
log.msg(log.debug, "category is " .. category .. " and first is " .. first .. " and last is " .. last)
|
||||
local button_num = 1
|
||||
for i = first, last do
|
||||
@@ -678,9 +773,11 @@ local function populate_buttons(category, first, last)
|
||||
clear_button(i)
|
||||
end
|
||||
end
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function paginate(direction)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
local category = sm.page_status.category
|
||||
log.msg(log.debug, "category is " .. category)
|
||||
local num_scripts = #sm.scripts[category]
|
||||
@@ -732,9 +829,11 @@ local function paginate(direction)
|
||||
sm.widgets.page_status.label = _("Page ") .. cur_page .. _(" of ") .. max_pages
|
||||
|
||||
populate_buttons(category, first, last)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function change_category(category)
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
if not category then
|
||||
log.msg(log.debug "setting category to selector value " .. sm.widgets.category_selector.value)
|
||||
sm.page_status.category = sm.widgets.category_selector.value
|
||||
@@ -744,9 +843,11 @@ local function change_category(category)
|
||||
end
|
||||
|
||||
paginate(2)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function change_num_buttons()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
cur_buttons = sm.page_status.num_buttons
|
||||
new_buttons = sm.widgets.num_buttons.value
|
||||
pref_write("num_buttons", "integer", new_buttons)
|
||||
@@ -777,9 +878,11 @@ local function change_num_buttons()
|
||||
log.msg(log.debug, "num_buttons set to " .. sm.page_status.num_buttons)
|
||||
paginate(2) -- force the buttons to repopulate
|
||||
sm.widgets.main_menu.selected = 3 -- jump back to start/stop scripts
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function load_preferences()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
-- load the prefs and update settings
|
||||
-- update_script_choices
|
||||
local pref_string = pref_read("installed_repos", "string")
|
||||
@@ -821,16 +924,18 @@ local function load_preferences()
|
||||
log.msg(log.debug, "set main menu to val " .. val .. " which is " .. sm.widgets.main_menu.value)
|
||||
|
||||
log.msg(log.debug, "set main menu to " .. sm.widgets.main_menu.value)
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
local function install_module()
|
||||
local old_log_level = set_log_level(sm.log_level)
|
||||
if not sm.module_installed then
|
||||
dt.register_lib(
|
||||
"script_manager", -- Module name
|
||||
"script manager", -- Visible name
|
||||
true, -- expandable
|
||||
false, -- resetable
|
||||
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_LEFT_BOTTOM", 600}}, -- containers
|
||||
{[dt.gui.views.lighttable] = {"DT_UI_CONTAINER_PANEL_LEFT_BOTTOM", 100}}, -- containers
|
||||
sm.widgets.main_box,
|
||||
nil,-- view_enter
|
||||
nil -- view_leave
|
||||
@@ -853,67 +958,75 @@ local function install_module()
|
||||
dt.control.sleep(5000)
|
||||
dt.print_log("setting sm expanded true")
|
||||
dt.gui.libs["script_manager"].expanded = true]]
|
||||
restore_log_level(old_log_level)
|
||||
end
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- M A I N P R O G R A M
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
local repo_data = get_repo_status(LUA_DIR)
|
||||
local current_branch = get_current_repo_branch(LUA_DIR)
|
||||
local clean = is_repo_clean(repo_data)
|
||||
local repo = LUA_DIR
|
||||
|
||||
if current_branch then
|
||||
if sm.executables.git and clean and
|
||||
(current_branch == "master" or string.match(current_branch, "^API%-")) then -- only make changes to clean branches
|
||||
local branches = get_repo_branches(LUA_DIR)
|
||||
if current_branch ~= LUA_API_VER and current_branch ~= "master" then
|
||||
-- probably upgraded from an earlier api version so get back to master
|
||||
-- to use the latest version of script_manager to get the proper API
|
||||
checkout_repo_branch(repo, "master")
|
||||
log.msg(log.screen, "lua API version reset, please restart darktable")
|
||||
elseif LUA_API_VER == current_branch then
|
||||
-- do nothing, we are fine
|
||||
log.msg(log.debug, "took equal branch, doing nothing")
|
||||
elseif string.match(LUA_API_VER, "dev") then
|
||||
-- we are on a dev API version, so checkout the dev
|
||||
-- api version or checkout/stay on master
|
||||
log.msg(log.debug, "took the dev branch")
|
||||
local match = false
|
||||
for _, branch in ipairs(branches) do
|
||||
log.msg(log.debug, "checking branch " .. branch .. " against API " .. LUA_API_VER)
|
||||
if LUA_API_VER == branch then
|
||||
match = true
|
||||
log.msg(log.info, "checking out repo development branch " .. branch)
|
||||
checkout_repo_branch(repo, branch)
|
||||
-- ensure shortcuts module knows widgets belong to script_manager
|
||||
|
||||
script_manager_running_script = "script_manager"
|
||||
|
||||
if check_for_updates then
|
||||
local repo_data = get_repo_status(LUA_DIR)
|
||||
local current_branch = get_current_repo_branch(LUA_DIR)
|
||||
local clean = is_repo_clean(repo_data)
|
||||
local repo = LUA_DIR
|
||||
|
||||
if current_branch then
|
||||
if sm.executables.git and clean and
|
||||
(current_branch == "master" or string.match(current_branch, "^API%-")) then -- only make changes to clean branches
|
||||
local branches = get_repo_branches(LUA_DIR)
|
||||
if current_branch ~= LUA_API_VER and current_branch ~= "master" then
|
||||
-- probably upgraded from an earlier api version so get back to master
|
||||
-- to use the latest version of script_manager to get the proper API
|
||||
checkout_repo_branch(repo, "master")
|
||||
log.msg(log.screen, "lua API version reset, please restart darktable")
|
||||
elseif LUA_API_VER == current_branch then
|
||||
-- do nothing, we are fine
|
||||
log.msg(log.debug, "took equal branch, doing nothing")
|
||||
elseif string.match(LUA_API_VER, "dev") then
|
||||
-- we are on a dev API version, so checkout the dev
|
||||
-- api version or checkout/stay on master
|
||||
log.msg(log.debug, "took the dev branch")
|
||||
local match = false
|
||||
for _, branch in ipairs(branches) do
|
||||
log.msg(log.debug, "checking branch " .. branch .. " against API " .. LUA_API_VER)
|
||||
if LUA_API_VER == branch then
|
||||
match = true
|
||||
log.msg(log.info, "checking out repo development branch " .. branch)
|
||||
checkout_repo_branch(repo, branch)
|
||||
end
|
||||
end
|
||||
end
|
||||
if not match then
|
||||
if current_branch == "master" then
|
||||
log.msg(log.info, "staying on master, no dev branch yet")
|
||||
else
|
||||
log.msg(log.info, "no dev branch available, checking out master")
|
||||
checkout_repo_branch(repo, "master")
|
||||
if not match then
|
||||
if current_branch == "master" then
|
||||
log.msg(log.info, "staying on master, no dev branch yet")
|
||||
else
|
||||
log.msg(log.info, "no dev branch available, checking out master")
|
||||
checkout_repo_branch(repo, "master")
|
||||
end
|
||||
end
|
||||
end
|
||||
elseif #branches > 0 and LUA_API_VER > branches[#branches] then
|
||||
log.msg(log.info, "no newer branches, staying on master")
|
||||
-- stay on master
|
||||
else
|
||||
-- checkout the appropriate branch for API version if it exists
|
||||
log.msg(log.info, "checking out the appropriate API branch")
|
||||
local match = false
|
||||
for _, branch in ipairs(branches) do
|
||||
log.msg(log.debug, "checking branch " .. branch .. " against API " .. LUA_API_VER)
|
||||
if LUA_API_VER == branch then
|
||||
match = true
|
||||
log.msg(log.info, "checking out repo branch " .. branch)
|
||||
checkout_repo_branch(repo, branch)
|
||||
log.msg(log.screen, "you must restart darktable to use the correct version of the lua")
|
||||
elseif #branches > 0 and LUA_API_VER > branches[#branches] then
|
||||
log.msg(log.info, "no newer branches, staying on master")
|
||||
-- stay on master
|
||||
else
|
||||
-- checkout the appropriate branch for API version if it exists
|
||||
log.msg(log.info, "checking out the appropriate API branch")
|
||||
local match = false
|
||||
for _, branch in ipairs(branches) do
|
||||
log.msg(log.debug, "checking branch " .. branch .. " against API " .. LUA_API_VER)
|
||||
if LUA_API_VER == branch then
|
||||
match = true
|
||||
log.msg(log.info, "checking out repo branch " .. branch)
|
||||
checkout_repo_branch(repo, branch)
|
||||
log.msg(log.screen, "you must restart darktable to use the correct version of the lua")
|
||||
end
|
||||
end
|
||||
if not match then
|
||||
log.msg(log.warn, "no matching branch found for " .. LUA_API_VER)
|
||||
end
|
||||
end
|
||||
if not match then
|
||||
log.msg(log.warn, "no matching branch found for " .. LUA_API_VER)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -923,7 +1036,6 @@ scan_scripts(LUA_DIR)
|
||||
log.msg(log.debug, "finished processing scripts")
|
||||
|
||||
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- U S E R I N T E R F A C E
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
@@ -1135,6 +1247,7 @@ sm.widgets.main_box = dt.new_widget("box"){
|
||||
sm.widgets.main_stack
|
||||
}
|
||||
|
||||
script_manager_running_script = nil
|
||||
|
||||
-- - - - - - - - - - - - - - - - - - - - - - - -
|
||||
-- D A R K T A B L E I N T E G R A T I O N
|
||||
|
||||
Reference in New Issue
Block a user