New script: 'transfer_hierarchy'.#234
Conversation
| end | ||
| job.valid = false | ||
| local filterRules = darktable.gui.libs.collect.filter() | ||
| darktable.gui.libs.collect.filter(filterRules) |
There was a problem hiding this comment.
I did a copy from a collection to a new collection. After the copy I expected to end up at the destination, but the existing root just got refreshed and set to the top of the collection. Would it be better to end up at the destination after a move or copy?
There was a problem hiding this comment.
Keeping the view on the source was done on account of there being no single "destination" directory for the images, so the only possible collection change would be to a collect-by-film-roll on the destination root, which in my case is an already-well-populated archive. Finding the freshly moved or copied images among all the images there is like finding a needle in a haystack.
contrib/transfer_hierarchy.lua
Outdated
|
|
||
| darktable.register_lib(LIB_ID, | ||
| "transfer hierarchy", true, true, { | ||
| [darktable.gui.views.lighttable] = { "DT_UI_CONTAINER_PANEL_RIGHT_CENTER", 1000 } |
There was a problem hiding this comment.
Setting the position to 700 puts transfer_hierarchy just below select, and selected_images. 1000 puts it at the top, above select, which might come as a surprise to users.
contrib/transfer_hierarchy.lua
Outdated
| -- Widgets and business logic: BEGIN | ||
|
|
||
| local sourceTextBox = darktable.new_widget("entry") { | ||
| tooltip = "Lowest directory containing all selected images", |
…cted image[s]'; added a translatability layer for strings; corrected behavior in the case of images with multiple versions.
The recent debates over file management on the mailing list indicate that some other Darktable users would have a use for this script that I wrote for rapid archiving of photos.
Darktable's built-in batch move and copy functionality only allows one destination directory per batch (analogous to a
mvorcpcommand applied to a list of files). This script moves or copies selected images to a new location in one batch while preserving their relative positions in the directory hierarchy (analogous to amvorcpcommand applied to the directory that is the images' lowest-common-ancestor).