Proof of concept below (very geeky, I am afraid):
xaxa
[code](**
PROOF OF CONCEPT: Relink images embedded in Scrivener RTF’s and exported to InDesign to their originals
… based on the fact that Exif CreateDate is maintained througout the odyssee.
- tested with Scrivener 1.5.4 and Indesign CS4
- important: this script requires exiftool (ExifTool by Phil Harvey)
Usage
- Export as RTF from Scrivener
- Pipe through Word 2008 (open in Word, save as…) – this is necessary to make the Scrivener RTFs compatible with InDesign
- Import (Place) in InDesign
- Use “Unembed Link” in InDesign’s “Link” palette to export the embedded images to a folder of choice
- Run this script, choose one of the images in the dialog
**)
– choose file (change this as required)
set myfile to choose file
set myfilepath to POSIX path of myfile
– Extract Exif ‘CreateDate’ with exiftool (sorry, Spotlight/mdls does not do the trick; kMDItemFSCreationDate is empty)
set mydate to do shell script “exiftool -d ‘%d/%m/%Y %H:%M:%S’ -s -s -s -CreateDate '” & myfilepath & “'”
set mydate to date mydate
– find file by date and time (this does for some reason not work with images inside a managed Aperture library)
property MacEpoch : (date (“01/01/2001” as string)) + (time to GMT)
set mysec to (mydate) - MacEpoch
set myResultPaths to do shell script “mdfind ‘kMDItemContentCreationDate == " & mysec & "’”
display dialog myResultPaths[/code]