ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: t1m081 on August 27, 2020, 08:02:17 AM

Title: pur:expirationDate with date and qualifier
Post by: t1m081 on August 27, 2020, 08:02:17 AM
Hi

I am new and hope this is not a very stupid question. I am currently prototyping a command to be used to write pur:expirationDate XMP elements to files. In the http://www.prismstandard.org/specifications/3.0/PRISM_Usage_Rights_Metadata_3.0.htm#_Toc336963261 (http://www.prismstandard.org/specifications/3.0/PRISM_Usage_Rights_Metadata_3.0.htm#_Toc336963261) prism documentation for this element I read that it is recommended to use the Qualifier distributionChannel to distinguish expiration dates by channel. This is actually pretty much what is needed in my specific case.

However when I try to add the Tag with distributionChannel ...

exiftool -addtagsfromfile @ "-XMP-pur:expirationDate={distributionChannel=print, Date=2022-12-31}" "-XMP-pur:expirationDate={distributionChannel=web, Date=2099-12-31}" filename.jpg

it looks like only the date(s) information gets written – not not the channel itself.

Output for
exiftool -expirationDate -struct filename.jpg

Expiration Date                 : 2022:12:31

Output for
exiftool -xmp -b filename.jpg
suggests that writing multiple dates does indeed work but without the qualifier it is of little use to me  :-\


<rdf:Description rdf:about=''
  xmlns:pur='http://prismstandard.org/namespaces/prismusagerights/2.1/'>
  <pur:expirationDate>
   <rdf:Bag>
    <rdf:li>2022-12-31</rdf:li>
    <rdf:li>2022-12-31</rdf:li>
    <rdf:li>2099-12-31</rdf:li>
   </rdf:Bag>
  </pur:expirationDate>
</rdf:Description>


Am I doing something wrong? Or is this not supported in exiftool?

Thank you in advance!
Timo
Title: Re: pur:expirationDate with date and qualifier
Post by: StarGeek on August 27, 2020, 11:31:06 AM
If you take a look at the XMP-pur (https://exiftool.org/TagNames/XMP.html#pur) listing, you'll see that exiftool will only accept a Date formatted string for that tag.

This will probably require Phil's attention as to any possible changes.  Unfortunately, he's currently on vacation until early September.

If you have an example file from another source that has the distribution channel already in it, that probably would be helpful.  Or even just the extracted XMP (use exiftool -b -XMP File.jpg to get the embedded XMP) posted here would probably work.
Title: Re: pur:expirationDate with date and qualifier
Post by: t1m081 on August 28, 2020, 08:10:30 AM
Thank you for the quick reply. I feared that would be the case but was hoping I did something wrong.

Unfortunately I don't have any example images that have the desired format in it. Just going by the documentation about prism standard I was hoping it is possible. We are managing expiration dates by channel in a database and during export / publishing would like to write the info into the image. Would that be possible – still using the pur:expirationDate tag – with a custom configuration file that allows a qualifier in it?

Title: Re: pur:expirationDate with date and qualifier
Post by: StarGeek on August 28, 2020, 11:16:29 AM
Yes, you could create a config file to override exiftool's base definition, though that would be beyond my ability in this case.

I just noticed that your link included some details as to what is supposed to be done (XMP Qualifer distributionChannel=) so Phil can probably make sense of it when he gets back.
Title: Re: pur:expirationDate with date and qualifier
Post by: Phil Harvey on September 08, 2020, 07:36:10 AM
Implementing XMP qualifiers is on my list of things to do.  Unfortunately, this will not be a simple addition.

(It had fallen to item 222 out of 558 on the to-do list, but I have bumped it up to the top now.)

- Phil
Title: Re: pur:expirationDate with date and qualifier
Post by: t1m081 on September 10, 2020, 05:20:19 AM
Thanks Phil!

This is going to be very useful in our case. I'll check back periodically to see if it is available. In the meantime we are going to work around this.