1
+ --[[
2
+ Passport cropping guide for darktable
3
+
4
+ copyright (c) 2021 Angel Angelov
5
+
6
+ darktable is free software: you can redistribute it and/or modify
7
+ it under the terms of the GNU General Public License as published by
8
+ the Free Software Foundation, either version 3 of the License, or
9
+ (at your option) any later version.
10
+
11
+ darktable is distributed in the hope that it will be useful,
12
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ GNU General Public License for more details.
15
+
16
+ You should have received a copy of the GNU General Public License
17
+ along with darktable. If not, see <http://www.gnu.org/licenses/>.
18
+ ]]
19
+
20
+ --[[
21
+ Original author: github.com/wpferguson
22
+ ]]
23
+
24
+ --[[
25
+ CHANGE GROUP LEADER
26
+ automatically change the leader of raw+jpg paired image groups
27
+
28
+ INSTALLATION
29
+ * copy this file in $CONFIGDIR/lua/ where CONFIGDIR is your darktable configuration directory
30
+ * add the following line in the file $CONFIGDIR/luarc
31
+ require "change_group_leader"
32
+
33
+ USAGE
34
+ * in lighttable mode, select the image groups you wish to process,
35
+ select whether you want to set the leader to "jpg" or "raw",
36
+ and click "Execute"
37
+ ]]
38
+
1
39
local dt = require " darktable"
2
40
local du = require " lib/dtutils"
3
41
local debug = require " darktable.debug"
@@ -16,9 +54,9 @@ cgl.widgets = {}
16
54
cgl .event_registered = false
17
55
cgl .module_installed = false
18
56
19
- -- - - - - - - - - - - - - - - - - - - - - - - -
57
+ -- - - - - - - - - - - - - - - - - - - - - - - -
20
58
-- F U N C T I O N S
21
- -- - - - - - - - - - - - - - - - - - - - - - - -
59
+ -- - - - - - - - - - - - - - - - - - - - - - - -
22
60
23
61
local function install_module ()
24
62
if not cgl .module_installed then
@@ -85,9 +123,9 @@ local function process_image_groups(images)
85
123
end
86
124
end
87
125
88
- -- - - - - - - - - - - - - - - - - - - - - - - -
126
+ -- - - - - - - - - - - - - - - - - - - - - - - -
89
127
-- W I D G E T S
90
- -- - - - - - - - - - - - - - - - - - - - - - - -
128
+ -- - - - - - - - - - - - - - - - - - - - - - - -
91
129
92
130
cgl .widgets .mode = dt .new_widget (" combobox" ){
93
131
label = " select new group leader" ,
@@ -109,9 +147,9 @@ cgl.widgets.box = dt.new_widget("box"){
109
147
cgl .widgets .execute ,
110
148
}
111
149
112
- -- - - - - - - - - - - - - - - - - - - - - - - -
113
- -- D A R K T A B L E I N T E G R A T I O N
114
- -- - - - - - - - - - - - - - - - - - - - - - - -
150
+ -- - - - - - - - - - - - - - - - - - - - - - - -
151
+ -- D A R K T A B L E I N T E G R A T I O N
152
+ -- - - - - - - - - - - - - - - - - - - - - - - -
115
153
116
154
if dt .gui .current_view ().id == " lighttable" then
117
155
install_module ()
0 commit comments