Q: Can Aperture import metadata?
I have some 6k+ photographs which all have had a string of text inserted in the caption field before the photographs description. I have been able to remove this text by exporting the metadata, opening it in text edit and doing a "find and replace".
I am stuck though with reimporting the metadata and applying the amended metadata to the photographs. Anyone have any thoughts on how to achieve this, or perhaps another workflow that may achieve the desired results?
eg,
Caption field
"A sentence full of useless text that appears in all 6k photographs.
Followed by the description that I need to keep"
after using text edit
Caption Field
"Followed by the description that I need to keep"
Looking forward to hearing your thoughts on this one.
Tony
nb. The "useless sentence" is identical in every caption.
Exporting the metadata takes everything, as in:
| Version Name | Title | Urgency | Categories | Suppl. Categories | Keywords | Instructions | Date Created | Contact Creator | Contact Job Title | City | State/Province | Country | Job Identifier | Headline | Provider | Source | Copyright Notice | Caption | Caption Writer | Rating | IPTC Subject Code | Usage Terms | Intellectual Genre | IPTC Scene | Location | ISO Country Code | Contact Address | Contact City | Contact State/Providence | Contact Postal Code | Contact Country | Contact Phone | Contact Email | Contact Website | Label | Latitude | Longitude | Altitude | AltitudeRef |
So of course ideally I only want to apply the amended caption and not end up with duplicated values in the other fields.
Mac Pro, OS X Mavericks (10.9.4), 3GHz 8 Core Intel Xeon ES, 32GB Ram
Posted on Apr 27, 2016 5:35 PM
Try this script, Tony: I have tested in in Aperture 3.6 on El Capitan, OS X 10.11.4:
This script will get all images you have currently selected in Aperture and remove the first part of each caption. The length of the removed part is determined by the variable "to_drop". set this variable to your text you need to remove.
Make a current backup of your library, before you try it. Test with a small test library.
- To use the script, launch Aperture and select all photos, that need the caption fixed.
- Copy and paste script into an open Script Editor window.
- Modify this line : set to_drop to the count of "your useless text " -- replace "your useless text" by the string that needs to be dropped from the start of the captions
-- ------------------------------------------------------------------------------- ----------------------------
-- This script will remove the first part of the caption of all currently selected images.
-- The length of the dropped part is determined by the variable "to_drop".
-- Select all images that need modifying the caption at once in Aperture, then click the Run button
-- Author: Léonie
tell application "Aperture"
set to_drop to the count of "your useless text " -- enter here the string that needs to be dropped from the start of the captions
activate
set imageSel to (get selection)
if imageSel is {} then
error "Please select some images."
else
repeat with im in imageSel
tell im
try
-- return the name of every IPTC tag
if exists IPTC tag "Caption/Abstract" then
set old_caption to the value of the IPTC tag "Caption/Abstract"
set new_caption to get rich text to_drop thru (the count of old_caption) of old_caption
set the value of the IPTC tag "Caption/Abstract" to new_caption
end if
error "IPTC tag" & "Caption/Abstract" & "does not exist"
end try
end tell
end repeat
end if
end tell
Posted on May 2, 2016 10:52 PM