Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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 NameTitleUrgencyCategoriesSuppl. CategoriesKeywordsInstructionsDate CreatedContact CreatorContact Job TitleCityState/ProvinceCountryJob IdentifierHeadlineProviderSourceCopyright NoticeCaptionCaption WriterRatingIPTC Subject CodeUsage TermsIntellectual GenreIPTC SceneLocationISO Country CodeContact AddressContact CityContact State/ProvidenceContact Postal CodeContact CountryContact PhoneContact EmailContact WebsiteLabelLatitudeLongitudeAltitudeAltitudeRef

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

Reply
5 replies

May 2, 2016 10:52 PM in response to Tony Gay

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 textto_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

May 2, 2016 11:42 PM in response to léonie

Léonie, legend status!


Using my test library of 200 images and with the same application and system versions as yourself, this script works exactly as you described, thank you.


Running it in my active library on 6,000+ images, perfect, taking 40 mins to complete.


This is one that Apple could comfortably include in either the application or as a part of the script libraries.


Thank you Léonie, I appreciate the time it would have taken to write and test this.


Tony

Can Aperture import metadata?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.