Bug 220402

Summary: Add a new BQM tool to call an external program [patch]
Product: [Applications] digikam Reporter: Martin S. <kde.20.cyscor>
Component: Plugin-Bqm-ScriptAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: caulier.gilles, mikmach, online
Priority: NOR    
Version: 1.1.0   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Unspecified   
Latest Commit: Version Fixed In: 5.0.0
Attachments: Path to add user script to BQM
Screenshot for the user script tool in BQM

Description Martin S. 2009-12-28 15:17:05 UTC
Version:            (using KDE 4.3.2)
Installed from:    Gentoo Packages

It would be a great feature do call some kind of external program(executable, bash script, python script, imagemagick) for selected photos and also from batch queue manager.
This would make it possible, to easily add custom filters to digikam without the need to write a plugin.
This would also be useful for supporting custom photo workflows which cannot be realized completely within digikam.

think the only input parameter needed for such a plugin would be the pathname to the external command line program including additional command line arguments.
Comment 1 H Law 2014-05-26 20:56:47 UTC
Created attachment 86842 [details]
Path to add user script to BQM

I have attempted the attached patch for the BQM to call an external script as part of the flow.  It is implemented as a custom tool, which can provide two parameters to call a user script, $INPUT and $OUTPUT, representing input and output file paths for the tool respectively.   Selected DigiKam metadata, such as rating, title and comments, are also available as environment variables.

A screenshot will be attached for reference.
Comment 2 H Law 2014-05-26 20:59:16 UTC
Created attachment 86843 [details]
Screenshot for the user script tool in BQM
Comment 3 caulier.gilles 2015-05-16 13:08:04 UTC
*** Bug 88932 has been marked as a duplicate of this bug. ***
Comment 4 caulier.gilles 2015-05-16 13:09:56 UTC
H Law,

Can you update your patch to work with current implementation from git/master (next 4.11.0)

Thanks in advance

Gilles Caulier
Comment 5 Maik Qualmann 2015-12-07 21:49:35 UTC
Git commit a5b8c149f7da56986f5db3581a3252b184bd675c by Maik Qualmann.
Committed on 07/12/2015 at 21:48.
Pushed by mqualmann into branch 'master'.

apply patch #86842 from Hubert Law to add user script tool for BQM
FIXED-IN: 5.0.0

M  +2    -1    NEWS
M  +1    -0    utilities/queuemanager/CMakeLists.txt
A  +258  -0    utilities/queuemanager/basetools/custom/userscript.cpp     [License: GPL (v2+)]
A  +69   -0    utilities/queuemanager/basetools/custom/userscript.h     [License: GPL (v2+)]
M  +12   -0    utilities/queuemanager/manager/batchtool.cpp
M  +6    -0    utilities/queuemanager/manager/batchtool.h
M  +4    -0    utilities/queuemanager/manager/batchtoolsmanager.cpp
M  +20   -3    utilities/queuemanager/manager/task.cpp
M  +3    -0    utilities/queuemanager/views/toolsview.cpp

http://commits.kde.org/digikam/a5b8c149f7da56986f5db3581a3252b184bd675c