Finder path to edit CO metadata
I've created a script for copying EIP files from a session's Selects folder to two locations: 1. the Output folder as an archive and 2. a network file share for processing by our retouch team. The destination server path is built out from the metadata we have placed during the renaming process. We have found some people are working too quickly and moving files before all of the metadata has been applied.
I'm trying to modify my file moving script to re-apply the metadata if it is missing, but because I'm moving files outside of Capture One (so Capture One can continue to be used while files transfer) the files aren't actively selected within Capture One. I'm wondering if there is a way to take a file path and turn it into a variant variable or something of the sort so that Capture One can interact with that particular file.
This is the metadata code we're using during the rename process but I'm having a hard time comprehending how we could take a path and feed it to the scrip to re-apply the metadata:
I'm trying to modify my file moving script to re-apply the metadata if it is missing, but because I'm moving files outside of Capture One (so Capture One can continue to be used while files transfer) the files aren't actively selected within Capture One. I'm wondering if there is a way to take a file path and turn it into a variant variable or something of the sort so that Capture One can interact with that particular file.
set exiftool_path to "/usr/local/bin/"
set thePath to "/Volumes/WORKING/In_Progress/17-07-31 irasumbaeva AM2 B5 pauliusmusteikis W/Selects/asdfg1234567890_20170731_on_74.eip"
set metadataArray to do shell script exiftool_path & "exiftool -T -s3 -Contact_Address -Contact_State_Province -Contact_City -Contact_Creator " & quoted form of thePath
set {modelname, baynumber, timeOfDay, shootFolderName} to my theSplit(metadataArray, tab)
if modelname = "" or baynumber = "" or timeOfDay = "" or shootFolderName = "" then
--re-apply metadata fields here
end if
This is the metadata code we're using during the rename process but I'm having a hard time comprehending how we could take a path and feed it to the scrip to re-apply the metadata:
tell application "Capture One 10"
set selectedVariants to (get selected variants)
tell current document
if selectedVariants is {} then
display notification "No images selected - select one or more images"
else
repeat with |counter| from 1 to count of selectedVariants
set thisVariant to item |counter| of selectedVariants
set oldStource to get status source of thisVariant
set contact creator of thisVariant to shootName
set contact creator job title of thisVariant to shootDate
set contact address of thisVariant to modelname
set contact city of thisVariant to timeOfDay
set contact state of thisVariant to baynumber
set contact postal code of thisVariant to photographerName
set contact country of thisVariant to businessunit
end repeat
end if
end tell
end tell
0
-
Hi Sean I'm not entirely clear on your purpose heere, but I not that the image path and the image ID both contain path information.
So you should be able to execute:- tell "application "Capture One 10" to get the image whose path is the_path
- tell "application "Capture One 10" to get the image whose id is the_id
0
Post ist für Kommentare geschlossen.
Kommentare
1 Kommentar