Script to regularly export (new) matching images?
Jens Benecke
jens-digikam at spamfreemail.de
Fri Dec 23 23:04:51 GMT 2016
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?
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.
Thanks!
Regards
--
Jens Benecke - jens at spamfreemail.de
Keine Lust auf Müll in ihrem Postfach? www.spamfreemail.de
More information about the Digikam-users
mailing list