In trying to grok list fields and the -Sep option, which has included studying faq#17, reading several forum posts, and performing lots of my own experiments I think I have it.
BUT I do wish to confirm what I think I have uncovered as one oddity related to [PDF] fields.
Using This Custom Config --
%Image::ExifTool::UserDefined = (
'Image::ExifTool::XMP::pdfx' => {
Books => { List => 'string' },
Album => { List => 'string' },
},
'Image::ExifTool::PDF::Info' => {
Books => { List => 'string' },
Album => { List => 'string' },
},
);
1; #end
With This Arguments File --
-Sep
; |<-note that there is one blank space here.
-Title=210 TEST Score F – List Fields
-Album=Album 1, Album 2; Album 3
-Books=Book Title 1
-overwrite_original
210_TEST_Score_F_ListFields.pdf
Gives Me This Result --
exiftool -a -G0 -Sep "##" 210_TEST_Score_F_ListFields.pdf
....
[PDF] Album : Album 1##Album 2; Album 3
[PDF] Books : Book##Title##1
[XMP] Album : Album 1, Album 2## Album 3
[XMP] Books : Book Title 1
My Observations and Conclusions:
1. The -Sep option is ineffective for writing [PDF] tags. Those tags will only, and always, separate list items using a comma, or if no comma is present in the string presented for writing, then blank spaces will be used to parse the string into separate items.
2. The -Sep option is effective for displaying [PDF] tags.
If I am missing anything, please advise!
See this thread (https://exiftool.org/forum/index.php?topic=14950.0).
Specifically, this post
Quote from: Phil Harvey on June 26, 2023, 01:33:49 PMThis is an unfortunate result of the lack of consistency in the PDF list format. Sometimes lists are stored as space-delimited words, and sometimes comma-delimited.
The -sep option is the separator used for input/output, not the one used for storage.
I've updated 12.65 to use semicolons for storage if an item contains a comma.
- Phil