[digiKam-users] Tagging photos with camera and lens names

Dmitri Popov dmpop at tokyoma.de
Mon Jul 5 10:42:53 BST 2021


Hello,

I actually like the idea. You can use ExifTool for that. Here is a shell script that might work off the top of my head (not tested):


#!/bin/bash
for file in *.JPG
do
camera=$(exiftool -Model "$file" | cut -d":" -f2 | tr -d " ")
lens=$(exiftool -LensID "$file" | cut -d":" -f2)
exiftool -sep ", " -keywords="$camera, $lens" "$file"
done

This should tag all JPG files in the current directory.

Kind regards,
Dmitri
---
digiKam Recipes -- https://dmpop.gumroad.com/l/digikamrecipes

July 3, 2021 12:06 PM, "meku" <digikam-users-21 at meku.org> wrote:

> Many reasons, including:
> 
> 1. It is not possible to quickly filter an album by camera or lens. True it is possible to create
> an advanced search but this requires several steps AND the knowledge in advance of which camera or
> lenses are used in the album.
> 
> 2. Videos do not have EXIF. Adding tags would create consistent metadata across photos and videos
> for my personal use cases.
> 
> 3. Support by third party software. When these photos are exported and used/ displayed elsewhere
> these other softwares do not support searching or grouping by camera and lens. They do support
> keyword tags, so adding tags would also solve this.
> On Fri, 2 Jul 2021 at 23:27, Remco Viƫtor <remco.vietor at wanadoo.fr> wrote:
> 
>> On vendredi 2 juillet 2021 15:09:10 CEST meku wrote:
>>> I'd like to tag photos with the camera and lens names from the EXIF data.
>>> Ideally I would use something like the BQM so that it can be somewhat
>>> automated.
>>> 
>>> Does anyone have a way to do this in Digikam or otherwise? Apologies if
>>> this has been answered before.
>> 
>> I wonder why you want to do this: that information is already in the metadata,
>> and can be used by the "advanced search" module in digikam.
>> 
>> So if you want to be able to search on camera or lens, there's no need to add
>> (read: copy) tags for this.


More information about the Digikam-users mailing list