Script to regularly export (new) matching images?
Simon Cropper
contact at simonchristophercropper.com
Sat Dec 24 13:52:42 GMT 2016
On 24/12/16 19:01, Gilles Caulier wrote:
>
>
> 2016-12-24 0:04 GMT+01:00 Jens Benecke <jens-digikam at spamfreemail.de
> <mailto:jens-digikam at spamfreemail.de>>:
>
> Hello,
>
> I collect all our family photos in Digikam (two cameras, three
> mobile phones, two tablets, and occasional screenshots or images
> mailed to us).
> I then geotag, tag and rate them. One of the tags is „for friends“
> of which I would like matching images to (automatically) be copied
> onto a SMB share on our NAS when images are added. I do not want
> to create copies within the Digikam hierarchy and I do not want to
> do this manually (unless it is done with a single mouse click).
>
> I imagine a command line image selection / export tool bundled
> with Digikam could do the trick which would output paths of
> matching images selected by criteria (tags would be sufficient).
> This can then be used in scripts. For example,
>
> digikam-select -c „Default“ -t „for friends“
>
> would output a list of files in collection „Default“ with tag „For
> friends“ with (relative) paths. E.g.
>
> 2016/July/IMG0192.JPG
> 2016/September/DCIM0992.JPG
> ...
>
> This could then be used to keep an external archive of (possibly
> reduced) JPG files automatically like I described above. For example,
>
> #!/bin/bash
> digikam-select -c „Default“ -t „for friends“ | while read
> FILE ; do
> test -f /media/my-SMB-share/Digikam-export/„$FILE“
> && continue
> # … create directory if it doesn’t exist …
> convert -quality 80 „$FILE“
> /media/my-SMB-share/Digikam-export/„$FILE“
> done
>
> Does something like this exist already or is planned?
>
>
> From digiKam developer : no.
>
> If not, would you accept such a tool in Digikam? I could at least
> write a companion script (in Ruby or Perl) with similar functionality.
>
>
> Sure. There is a directory in application to host 3rdparty scripts,
> but we don't maintain code.
>
> https://cgit.kde.org/digikam.git/tree/data/scripts
>
> The problematic of this solution is the difficulty to have scripts
> updated in time. A git access must used or a request to developers
> need to be sent.
>
> Perhaps it's time to use a github repository to host all scripts which
> will be more easy to maintain in time for end-users ?
>
> Best
>
> Gilles Caulier
The simplest way of doing this is to use a script. Collections are just
directories and tags can be extracted easily using exiv2
(http://www.exiv2.org/) or exiftools
(http://www.sno.phy.queensu.ca/~phil/exiftool/).
--
Cheers Simon
Simon Christopher Cropper
Mobile: 0431 821 566
Email: contact at simonchristophercropper.com
<mailto:contact at simonchristophercropper.com>
Online CV: http://www.simonchristophercropper.com/
LinkedIn: http://au.linkedin.com/in/simonchristophercropper/
ResearchGate: https://www.researchgate.net/profile/Simon_Cropper3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-users/attachments/20161225/9590fe46/attachment.html>
More information about the Digikam-users
mailing list