Bug 311973 - Extra commas in IPTC keywords should be trimmed, otherwise messes up naming
Summary: Extra commas in IPTC keywords should be trimmed, otherwise messes up naming
Status: RESOLVED NOT A BUG
Alias: None
Product: digikam
Classification: Applications
Component: Metadata-Iptc (show other bugs)
Version: 2.9.0
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-20 08:44 UTC by Joseph Reagle
Modified: 2022-01-08 13:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.5.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Reagle 2012-12-20 08:44:06 UTC
Hi, I've noticed in using Digikam I ended up with e.g. Keywords=", test" (in the IPTC metadata tab, but nothing in the tag edit itself). This appears as an empty keyword in other applications and (more importantly) interferes with my naming system (wherein keywords are separated by a hyphen) because I end up with files with '--' in them (null value between the hyphens).

Digikam should trim extra commas / empty keywords.

Reproducible: Always

Steps to Reproduce:
1. Somehow end up with extra comma -- perhaps this can be done on purpose.
2. Look at IPTC metadata
3. Try a rename mask like this and see extra hyphens: [date:dd-hmm]-[meta:Iptc.Application2.Keywords]{replace:", ","-",i}{lower}
Actual Results:  
extra commas -- and hyphens in rename

Expected Results:  
trimmed commas (no empty keywords)
Comment 1 caulier.gilles 2012-12-20 08:54:42 UTC
The comma in digiKam IPTC metadata sidebar is a presentation separator for keywords tag. In metadata as well, nothing is separated by a comma. Each keyword is hosted in a dedicated field... This is the standard IPTC encoding schema. Sound like your problem is in another place... Please check...

Gilles Caulier
Comment 2 Joseph Reagle 2012-12-20 13:08:29 UTC
On 12/20/2012 03:54 AM, Gilles Caulier wrote:
> --- Comment #1 from Gilles Caulier <caulier.gilles@gmail.com> ---
> The comma in digiKam IPTC metadata sidebar is a presentation separator for
> keywords tag. In metadata as well, nothing is separated by a comma. Each
> keyword is hosted in a dedicated field... This is the standard IPTC encoding
> schema. Sound like your problem is in another place... Please check...

Hi Gilles, then the problems are that (1) digikam can create blank 
keywords fields and (2) doesn't remove them -- regardless of their 
source. (I was thrown off by the comma in the metadata field.) Do you 
now of a way to delete them?
Comment 3 caulier.gilles 2012-12-20 13:17:12 UTC
1/ => no. GUI, do not accept blank entry...
2/ if yes, it's probably an Exiv2 issue... Exiv2 shared lib is used i background to manage IPTC entries.

Do you tries Exiftool to remove empty IPTC fields ?

Gilles Caulier
Comment 4 Joseph Reagle 2012-12-20 16:32:26 UTC
On 12/20/2012 08:17 AM, Gilles Caulier wrote:
> Do you tries Exiftool to remove empty IPTC fields ?

If I know what field is, such as a single space, this is possible:

     exiftool -keywords+=' ' test.jpg

However, when I encountered this problem I wasn't sure what the 
whitespace actually was.