GP, thanks for your detailled email.
No, I didn't knew that the EXIFtool parse the XMP file data.
(Now that you said this it seems obvious to me too - I thought initially
that the EXIFtool will somehow read the photo-file, but that's nonsense,
since the IPTC-data is in the XMP-file ant not in the RAW / JPG / TIFF -
file itself).
Your 4-steps "*formula*" sounds much more valid than my dream script.
I understand on the high level what you're describing here but
unfortunately I have no clue how to implement it since I haven't had the
chance to dig into perl yet.
Let me clarify the only manual step that I still see in the whole
process: I'll have to set the IPTC-metadata (at least the basic one like
caption, keywords, author, copyright etc.) for each and every photo-file
(CR2, JPG, TIFF).
Only after this "*manual labor*" :-) I'd like to choose either the
root-folder of all my photo-subfolders or - if this will be too slow -
each photo-subfolder and let the script automatically copy the
IPTC-keywords of each photo-file (from the XMP-file, via EXIFtool) into
its Finder-tags.
As I said initially, I thought about BBEdit first because BBEdit Talk is
filled with GREP / regex - questions and it seem like a piece of cake
(iterate over a series of text-files, parse the IPTC-keywords and pipe
them into something that tag the photo-file with it… easy, right?! ;-)
If my question is actually inappropriate here or better suited elsewhere
I'm sorry and totally grateful for each and every hint, because: I still
have this HUGE PILE of photos to tag! ;-) :-(
Thanks again, GP!
Regards,
Vlad
On 14 Mar 2020, at 18:33, GP wrote:
Do you know "the EXIFtool, a command line utility" is just a wrapper
for a
perl module you can download the source code for from CPAN?
If you dig down into the perl source code you'll find the regular
expressions used by EXIFtool to parse XMP file data. Since BBEdit
uses the
PCRE library for grep searching, whatever regular expressions you find
in
perl code can work with BBEdit (albeit you may have to do some work if
there are precompiled regular expression variables involved).
Also, EXIFtool can read .XMP files. So, if you have a faster means of
extracting the metadata from photo files and creating the .XMP files,
you
can use that faster means and still use EXIFtool code on the trimmed
down
metadata only .XMP files.
Also, for your dream script, write a perl script which imports the
EXIFtool
perl module which:
1. For a given input directory, uses the glob function to build a list
of
files of *.XMP files
2. Iterate over the list of XMP files and use the routine(s) from the
EXIFtool module to extract the desired tags
3. Extract the base file name from the XMP file name you've just
extracted
the tags from and then glob another file list (e.g., base*.JPG,
base*.TIFF)
4. Iterate over the file list created in 3 writting out to each file
the
tags extacted from the specific XMP file iteration
As far as scaling concerns goes, that's a lot of files to be writing
metadata out to the file system on so I don't think you're going to
find
any solution that's very speedy. As I think you're hinting at,
anything
that involves a manual step per file isn't a viable solution.
From your follow up postings I see you're trying to find a scripting
type
solution using an automated (scripted?) combination of BBEdit features
and
yet to be determined glue. However great a development tool BBEdit
is, I
don't think trying for a BBEdit specific solution is a good first
choice to
pursue.
On Friday, March 13, 2020 at 5:37:02 AM UTC-7, Vlad Ghitulescu wrote:
Hey!
This is a BBEdit-question, but I first need to give a little
background to
it. :-)
[snip]
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.
[snip]
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/3784e93c-9613-46b4-af8e-b50ab9deee1c%40googlegroups.com.
--
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/B0B72391-8AE2-4C60-9CA3-411C7F248911%40Ghitulescu.de.