Hey!
This is a BBEdit-question, but I first need to give a little background
to it. :-)
As all photographers here already know, the metadata to the photos lives
in a suplimentary XMP-file.
Here is a sample of a XMP-file for one of my photos, where I filled in
the so called *IPTC-keywords* in Photo Mechanic:
---
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.6.0">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:photoshop="http://ns.adobe.com/photoshop/1.0/"
xmlns:xmp="http://ns.adobe.com/xap/1.0/"
xmlns:photomechanic="http://ns.camerabits.com/photomechanic/1.0/"
photoshop:DateCreated="2018-05-10T13:35:00.03"
xmp:CreateDate="2018-05-10T13:35:00.03"
xmp:Rating="0"
photomechanic:ColorClass="0"
photomechanic:Tagged="False"
photomechanic:Prefs="0:0:0:-00001"
photomechanic:PMVersion="PM6">
<dc:subject>
<rdf:Bag>
<rdf:li>Ben</rdf:li>
<rdf:li>Mina</rdf:li>
<rdf:li>Tom</rdf:li>
<rdf:li>Vlad</rdf:li>
</rdf:Bag>
</dc:subject>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
---
The individual data is the creation-date:
---
photoshop:DateCreated="2018-05-10T13:35:00.03"
xmp:CreateDate="2018-05-10T13:35:00.03"
---
and the IPTC-keywords:
---
<rdf:li>Ben</rdf:li>
<rdf:li>Mina</rdf:li>
<rdf:li>Tom</rdf:li>
<rdf:li>Vlad</rdf:li>
---
Another background-information that probably all of you know: there is
no relation between the IPTC / XMP - keywords and the Finder / macOS -
tags.
And this exactly is my problem.
I need to input somehow / somewhere the metadata to my photos, but I
don't want to make this twice in order to have this information present
in the IPTC-keywords AND in the Finder-tags as well.
This is not new at all: Google-ing about "*copy IPTC-keywords into
Finder-tags*" or viceversa I've found a lot but all of it involved in
one step or another the EXIFtool, a command line utility that reads and
writes photo-metadata… and this doesn't scale very well (I have A LOT
of photos: about 220,000 pics that are more than 2 TB big!) and it is
slow, because the EXIFtool have to read the metadata from the photo.
So my idea is to take care or the IPTC-keywords in Photo Mechanic (this
would create a XMP-file as the one above for every photo I have) and
then - and here comes BBEdit! :-) - *somehow* transfer the data from the
XMP-file (that is in the end only a text-file!) to the Finder-tags.
Now finally to my question (sorry for the length!): How could I
- take each IPTC-keyword (delimited by the tag < rdf:li >, see above)
and
- write this IPTC-keyword into a Finder-tag
for every photo in a folder?
Ideally I'd have a script, point it to a folder full of photos and
BOOM!, after this every photo would have the same Finder-tags as the
IPTC-keywords!
Could you please help me with this?
Thanks in advance!
Regards,
Vlad
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/93FE2214-4BDD-4C41-952F-61C910E44C38%40Ghitulescu.de.