Für meinen Lightroom Workflow nutze ich das unten aufgeführte AppleScript. D. h. Lightroom exportiert die ausgewählten Bilder in voller Auflösung in meine BildOrdnerStruktur. Das Script wird nun gestartet und erzeugt aus diesen Bildern Kopien in unterschiedlichen Auflösungen. Die entsprechende Auflösung wird als Suffix an den Dateinamen angehängt.
Das sieht dann so aus...
Leider blicke ich bei AppleScript nicht so wirklich durch, sodass ich folgende Änderung an dem Script nicht hinbekomme.
Ich möchte, dass im Exportordner der Auflösung (newSizes) entsprechend Unterordner erzeugt werden und die Bilder entsprechend eingefügt werden.
Kann mir jemand auf die Sprünge helfen?
Es sollte dann so aussehen:
Das Script habe ich hier gefunden:
Code
- on open of myFiles
- set newSizes to {500, 1500}
- repeat with aFile in myFiles
- set filePath to aFile's POSIX path
- set bPath to (do shell script "dirname " & quoted form of filePath)
- tell application "System Events" to set fileName to aFile's name
- repeat with counter from 1 to count of newSizes
- set newSize to item counter of newSizes
- do shell script "sips " & quoted form of aFile's POSIX path & " -Z " & newSize & " --out " & quoted form of (bPath & "/" & rename(fileName, newSize, counter) as text)
- end repeat
- end repeat
- end open
- on rename(fName, fSize, fCounter)
- set newSuffixes to {"_500px", "_1500px"}
- set newSuffix to item fCounter of newSuffixes
- set dotOffset to offset of "." in (reverse of characters in fName as text)
- set baseName to characters 1 thru -(dotOffset + 1) of fName as text
- set extension to characters -(dotOffset - 1) thru length of fName as text
- set newName to baseName & newSuffix & "." & extension
- return newName
- end rename