Impossible to enter comma separated list of values with repeated elements

Started by Pawel, October 23, 2022, 11:48:39 PM

Previous topic - Next topic

Pawel

I try to enter Artwork or Object Details into individual tags like Artwork Title, Artwork Creator or Artwork Source. When there is more than one Artwork or Object in a photo I enter individual Artwork or Object's details as a comma separated list of values, like:

Artwork Title: painting 1, painting 2, painting 3
Artwork Creator: painter 1, painter 2, painter 1
Artwork Source: gallery 1, gallery 2, gallery 1

Unfortunately IMatch cleans duplicated values from the comma separated list when saving metadata, so it is not possible to enter metadata for objects that share some characteristics (like multiple paintings from the same gallery or by the same painter) - what is left is:

Artwork Title: painting 1, painting 2, painting 3
Artwork Creator: painter 1, painter 2
Artwork Source: gallery 1, gallery 2

Would it be possible to make that cleaning of duplicates optional in a metadata panel layout config?  

Mario

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pawel

It doesn't work in this case, or at least not in a way I would expect given that Artwork or Object is a structure and by creating lists of values I would like to fill that structure.

I started with an image with no Artwork or Object information and added following data:
  • Artwork Copyright Notice: copyright1, copyright2, copyright3
  • Artwork Creator: painter1, painter2, painter3
  • Artwork Date Created: 2014:01:01 00:00:00, 2015:03:02 00:00:00, 2016:03:03 00:00:00
  • Artwork Physical Description: watercolor on paper, oil on canvas, acrylic on canvas
  • Artwork Source: gallery1, gallery2, gallery3
  • Artwork Title: painting1, painting2, painting3

What I got was:
"c:\Program Files\photools.com\imatch6\exiftool.exe" 20220909-000923.dng -struct -artworkorobject
Artwork Or Object               : [
{AOCreator=[painter1,painter2,painter3],AODateCreated=2014:01:01 00:00:00,AOPhysicalDescription=oil on canvas1,AOSource=gallery1,AOTitle=painting1},
{AODateCreated=2015:03:02 00:00:00,AOPhysicalDescription=oil on canvas2,AOSource=gallery2,AOTitle=painting2},
{AODateCreated=2016:03:03 00:00:00,AOPhysicalDescription=oil on canvas3,AOSource=gallery3,AOTitle=painting3}
]

So it worked for most of the fields - only the AOCreator field is not treated as a list. 

When I tried to write some fields with repeated values like:
  • Artwork Creator: painter1, painter2, painter1
  • Artwork Source: gallery1, gallery2, gallery1

IMatch removed repeated values and I got:
"c:\Program Files\photools.com\imatch6\exiftool.exe" 20220909-000923.dng -struct -artworkorobject
Artwork Or Object              : [
{AOCreator=[painter1,painter2],AODateCreated=2014:01:01 00:00:00,AOPhysicalDescription=oil on canvas1,AOSource=gallery1,AOTitle=painting1},
{AODateCreated=2015:03:02 00:00:00,AOPhysicalDescription=oil on canvas2,AOSource=gallery2,AOTitle=painting2},
{AODateCreated=2016:03:03 00:00:00,AOPhysicalDescription=oil on canvas3,AOTitle=painting3}
]


To try the ";" solution I started from scratch: I removed all the Artwork or Object data and after writeback I added them again, this time using ";" instead of comma:
  • Artwork Creator: painter1; painter2; painter1
  • Artwork Source: gallery1; gallery2; gallery1

The result wasn't good however:
"c:\Program Files\photools.com\imatch6\exiftool.exe" 20220909-000923.dng -struct -artworkorobject
Artwork Or Object              : [
{AOCreator=[painter1; painter2; painter1],AODateCreated=2014:01:01 00:00:00,AOPhysicalDescription=watercolor on paper,AOSource=gallery1; gallery2; gallery1,AOTitle=painting1},
{AODateCreated=2015:03:02 00:00:00,AOPhysicalDescription=oil on canvas,AOTitle=painting2},
{AODateCreated=2016:03:03 00:00:00,AOPhysicalDescription=acrylic on canvas,AOTitle=painting3}
]

So it looks like there are two problems:
  • Not all Artwork or Object fields are treated as a list of values and distributed into individual structures (AOCreator, maybe others - I can check).  
  • Duplicate entries removal. 

Also, the Artwork Date Created field only shows one entry, despite allowing three entries to be entered and edited. 

digedag

Quote from: Pawel on October 23, 2022, 11:48:39 PMIMatch cleans duplicated values
Same here:
- History Software Agent {File.MD.XMP::xmpMM\HistorySoftwareAgent\HistorySoftwareAgent\0}
- History Action {File.MD.XMP::xmpMM\HistoryAction\HistoryAction\0}

but ONLY if I use semicolon [;] as separator. If I use comma [,] instead everything is as expected.
Strange.

Bernhard

digedag

Quote from: Pawel on October 24, 2022, 11:19:20 AM[...] field only shows one entry, despite allowing three entries to be entered and edited.
Same again, but field
- History When: {File.MD.XMP::xmpMM\HistoryWhen\HistoryWhen\0}

Bernhard

thrinn

Not sure if this is relevant for this special topic, but also pay attention to the Windows List Separator you configured (this is a Windows, not an IMatch setting).
Thorsten
Win 10 / 64, IMatch 2018, IMA

Mario

Also check in the Output panel for ExifTool to see what IMatch is sending to ExifTool to write.
Don't update structured tags directly, IMatch uses the flattening mode of ExifTool to each field of structures becomes a separate tag.

As pointed out by thrinn, the Windows list separator you have chosen may be relevant for this. It is usually , or ; in most countries.

QuoteIMatch removed repeated values and I got:
IMatch does not check for or remove duplicate values it receives from ExifTool. AFAIK. Need to check that.
Please open a bug report.

To analyze this further, this would require a detailed analysis of what was input in IMatch, what was sent to ExifTool for writing, what ExifTool wrote into the file and what exported again when IMatch re-imported the file after the write-back.
Is this a file which uses embedded XMP or XMP in a sidecar file?

Writing complex structured XMP tag editors for each of the structured tags in XMP namespaces would be a major project and, given the very small number of users who actually have a need to these special tags, I'm currently not willing to put several weeks or months into developing individual editors for these special XMP tags.
Usually there is are industry-specific applications (like software for museums, the press, medical applications) which deal with these structured tags in these special namespaces.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Pawel

I will investigate this further re: IMatch/exiftool information exchange and see if there is a bug to report. 

As for now, two quick points:
  • Windows list separator on my system is set to ";" - I use "," in the metadata panel. 
  • Removal of duplicate values - looks like it is done by IMatch before even trying metadata write back. 

Steps to reproduce no. 2 on my system:
  • Add some Artwork or Object fields to metadata panel (I use Artwork Creator, Artwork Source, Artwork Physical Description). 
  • Fill some duplicated data, like "painter1, painter2, painter1". 
  • Hit "OK" (green checkmark) on the top of the metadata panel.
  • As the data is saved in IMatch database (green checkmark changes to grey) only "painter1, painter2" remains in the field of the metadata panel. 

Mario

IMatch separates repeatable values via the "keyword separator" set under Edit > Preferences > Metadata.
The name is slightly misleading, but unchanged since version 5, so...

I'm not in my lab currently. I do recall that IMatch might de-duplication for repeatable values, which makes usually sense (e.g. keywords). But not in this particular case, where a user is entering multiple values for flattened structure elements directly in the Metadata Panel. Not sure how to handle this. This works that way since IMatch 5.

Please open a bug report so I have a ticket and can schedule time to analyze this and come up with a solution for a later IMatch version. I've shipped two updates since Friday and the next regular update is scheduled for around December or so.

These structured tags are difficult to deal with. For example, writing the flattened values does not clear the structured tag. So IMatch has to a) know that the flattened tag is part of a structure and what other tags to delete to ensure that modified values are not repeated many times in the structured tag... I don't remember the details at the moment, though.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

akirot

Following Mario's discussion on the ET forum the current developments look very promising.
Actually I expected some challenges handling metadata structures.
That's the only reason why I kept my fingers away from entering artwork metadata until now.
I'm keen on a new IMatch version that does it - helps me keeping my metadata tidy!

Pawel is not alone and not the only user asking for it.

Mario

Supporting this particular type of structured tags is only relevant for a small number of users. It may become relevant for more users in the future, I don't know yet.
Important structured tags like XMP regions (for faces) are handled by IMatch for a long time.

Disabling de-duplication of repeatable tags except keywords is only one part of the issue that we discuss here.
The specific layout of ArtWorkOrObject and the way ExifTool treats flattened tags in general during write-back first requires a change in ExifTool to make it possible for software like IMatch to reliably discover tag relations. Phil was so kind to agree to making this change.

For IMatch 2023 I will look into supporting this. It requires changes in the ingest process and the tag import from ExifTool. Changes to the data model and database. Changes to the write-back process. Not to speak of a potential enhancement for the Metadata Panel to allow for structured tag input. Quite a lot of work to do for this.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

digedag

Quote from: akirot on November 05, 2022, 08:29:15 AMFollowing Mario's discussion on the ET forum the current developments look very promising. [...]
Sorry, can not follow. What is ET forum?

Bernhard

sinus

Quote from: digedag on November 05, 2022, 03:00:09 PM
Quote from: akirot on November 05, 2022, 08:29:15 AMFollowing Mario's discussion on the ET forum the current developments look very promising. [...]
Sorry, can not follow. What is ET forum?

Bernhard
Nor do I.
Maybe Exiftool forum? https://exiftool.org/forum/index.php


Best wishes from Switzerland! :-)
Markus


digedag