Skip to content

Commit 803537c

Browse files
committed
add comments to change_group_leader
1 parent 4648c2d commit 803537c

File tree

1 file changed

+45
-7
lines changed

1 file changed

+45
-7
lines changed

contrib/change_group_leader.lua

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
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+
139
local dt = require "darktable"
240
local du = require "lib/dtutils"
341
local debug = require "darktable.debug"
@@ -16,9 +54,9 @@ cgl.widgets = {}
1654
cgl.event_registered = false
1755
cgl.module_installed = false
1856

19-
-- - - - - - - - - - - - - - - - - - - - - - - -
57+
-- - - - - - - - - - - - - - - - - - - - - - - -
2058
-- F U N C T I O N S
21-
-- - - - - - - - - - - - - - - - - - - - - - - -
59+
-- - - - - - - - - - - - - - - - - - - - - - - -
2260

2361
local function install_module()
2462
if not cgl.module_installed then
@@ -85,9 +123,9 @@ local function process_image_groups(images)
85123
end
86124
end
87125

88-
-- - - - - - - - - - - - - - - - - - - - - - - -
126+
-- - - - - - - - - - - - - - - - - - - - - - - -
89127
-- W I D G E T S
90-
-- - - - - - - - - - - - - - - - - - - - - - - -
128+
-- - - - - - - - - - - - - - - - - - - - - - - -
91129

92130
cgl.widgets.mode = dt.new_widget("combobox"){
93131
label = "select new group leader",
@@ -109,9 +147,9 @@ cgl.widgets.box = dt.new_widget("box"){
109147
cgl.widgets.execute,
110148
}
111149

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+
-- - - - - - - - - - - - - - - - - - - - - - - -
115153

116154
if dt.gui.current_view().id == "lighttable" then
117155
install_module()

0 commit comments

Comments
 (0)