Copying IPTC Description Field to Keyword

Discussion regarding all scripting related questions
Please DO NOT post to this thread anything that is not directly related to scripting of Capture One.

Copying IPTC Description Field to Keyword

Postby NNN635840219760212988 » Sun Apr 01, 2018 7:43 pm

Is there a script or something to copy an IPTC Description field to a keyword? Thanks!
NNN635840219760212988
 
Posts: 7
Joined: Wed Nov 25, 2015 5:19 am

Re: Copying IPTC Description Field to Keyword

Postby rapdigital » Tue Apr 03, 2018 11:49 am

I would love to be wrong but I believe Keywords are READ/ONLY via AS!?!

Is there a particular reason you need your IPTC data in the keywords?
rapdigital
Certified Professional
Certified Professional
 
Posts: 162
Joined: Mon Feb 02, 2009 1:52 pm

Re: Copying IPTC Description Field to Keyword

Postby Eric Nepean » Tue Apr 03, 2018 4:04 pm

Keywords are readonly, but I think it might be possible that an already existing Keyword may be added to a variant.

But why? One can pour a lot of effort into an Applescript, It's important to choose the simplest solution.

If the information is already in the IPTC Description field, you can sort using that field, and actually it's far easier to use that field for purposes like export receipes than to use a keyword.
Cheers, Eric
[late 2015 iMac, 4GHz i7, 24GB RAM, external SSDs. GX8, E-M1, GX7, GM5, GM1 ....]
Eric Nepean
 
Posts: 173
Joined: Sat Oct 25, 2014 8:02 am

Re: Copying IPTC Description Field to Keyword

Postby Jim_DK » Wed Apr 04, 2018 10:58 am

Not quite true

The keyword elements of a variant can be deleted and added to, but individual keywords are read only. As an example:

Code: Select all
tell application "Capture One 11"
   tell primary variant to make new keyword with properties {name:"Test"}
end tell
James
Phase One DK
Jim_DK
Crew
Crew
 
Posts: 632
Joined: Thu Dec 03, 2009 10:00 pm

Re: Copying IPTC Description Field to Keyword

Postby rapdigital » Wed Apr 04, 2018 11:12 am

Awesome thanks James
rapdigital
Certified Professional
Certified Professional
 
Posts: 162
Joined: Mon Feb 02, 2009 1:52 pm

Re: Copying IPTC Description Field to Keyword

Postby nathank » Tue May 15, 2018 8:58 pm

I actually have to do this regularly because of an outdated customization to one of our enterprise systems. Took a bit of trial and error but eventually got there!

As others have already confirmed, you can't do this with AppleScript, but you can do it with exiftool by Phil Harvey:https://www.sno.phy.queensu.ca/~phil/exiftool/

The command strings you're looking for would look like this:
Code: Select all
exiftool "-Keywords<Description" -m example.psd

Code: Select all
exiftool -sep ", " -tagsfromfile @ -keywords example.psd


I do this from the command line on a Mac, but I think there are some Exiftool GUI variants out there for Windows users.
nathank
 
Posts: 1
Joined: Mon Jul 27, 2009 10:07 pm

Re: Copying IPTC Description Field to Keyword

Postby rapdigital » Sat May 19, 2018 2:49 pm

Or to do with CO

Code: Select all
tell application "Capture One 10"
   set theTag to get content description of primary variant
   tell primary variant to make new keyword with properties {name:theTag}
end tell
rapdigital
Certified Professional
Certified Professional
 
Posts: 162
Joined: Mon Feb 02, 2009 1:52 pm


Return to Scripting



Who is online

Users browsing this forum: No registered users and 1 guest