How to determine if list-type content is really a list.

Started by dwlott, January 15, 2024, 11:04:03 PM

Previous topic - Next topic

dwlott

Hello again,
-Keywords returns a comma separated list.  How can I tell if it's a list or just one value of comma separated strings?

After posting, I found this:
https://exiftool.org/struct.html

I have some homework to do.

dwlott

#1
Quote from: dwlott on January 15, 2024, 11:04:03 PM-Keywords returns a comma separated list.  How can I tell if it's a list or just one value of comma separated strings?
This works great.

-struct
-f
-T
-Directory
-FileName
-Keywords
e:\mySourceFolder


StarGeek

I use the -sep option

C:\>exiftool -G1 -a -s -Subject y:\!temp\Test4.jpg
[XMP-dc]        Subject                         : This, is, a, list, This, is, not, a, list

C:\>exiftool -G1 -a -s -sep ## -Subject y:\!temp\Test4.jpg
[XMP-dc]        Subject                         : This##is##a##list##This, is, not, a, list
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wywh

I use -sep '//' (GraphicConverter uses , and ; as a separator when writing so I use // in exiftool to check what is the actual separator) or -v (the separated list tags should then be on separate lines):

exiftool -a -G1 -s -sep '//' -Keywords -Subject image.jpg
[IPTC]          Keywords                        : Harvey, Phil//Marley, Bob
[XMP-dc]        Subject                         : Harvey, Phil//Marley, Bob

exiftool -a -G1 -s -v image.jpg
  | + [IPTC directory, 85 bytes]
  | | Keywords = Harvey, Phil
  | | Keywords = Marley, Bob
  + [XMP directory, 3105 bytes]
  | Subject = Harvey, Phil
  | Subject = Marley, Bob

BTW I just noticed that macOS 14.2.1 Sonoma Photos.app forces comma as a separator when importing such image or movie Keywords (on the other hand it accepts semicolon in Keywords). I'd avoid both characters in list type tags.

- Matti

StarGeek

Quote from: wywh on January 16, 2024, 03:36:45 AMBTW I just noticed that macOS 14.2.1 Sonoma Photos.app forces comma as a separator when importing such image or movie Keywords (on the other hand it accepts semicolon in Keywords). I'd avoid both characters in list type tags.

The old Google Picasa software did the same thing. It was really annoying.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

dwlott

Thank you guys for the extra tips.  The information saved me time.