使用AppleScript导出Apple照片收藏夹
我正在试图找到一种方法来进行以下导出 当前结构 蜜月 县 城市 相册 我想将结构导出为我的图片文件夹 蜜月>县>市>相册>照片名 但我只想选择已编辑的照片(通常是最喜欢的) 我找到了一个AppleScript,它可以让我选择一个相册并导出它的内容使用AppleScript导出Apple照片收藏夹,applescript,apple-photos,Applescript,Apple Photos,我正在试图找到一种方法来进行以下导出 当前结构 蜜月 县 城市 相册 我想将结构导出为我的图片文件夹 蜜月>县>市>相册>照片名 但我只想选择已编辑的照片(通常是最喜欢的) 我找到了一个AppleScript,它可以让我选择一个相册并导出它的内容 set dest to "/Users/adammann/Pictures/HoneymoonExports" as POSIX file as text -- the destination folder (use a valid path) tel
set dest to "/Users/adammann/Pictures/HoneymoonExports" as POSIX file as text -- the destination folder (use a valid path)
tell application "Photos"
activate
set l to name of albums
set albNames to choose from list l with prompt "Select some albums" with multiple selections allowed
if albNames is not false then -- not cancelled
repeat with tName in albNames
set tFolder to dest & tName
my makeFolder(tFolder) -- create a folder named (the name of this album) in dest
export (get media items of album tName) to (tFolder as alias) without using originals
end repeat
end if
end tell
on makeFolder(tPath)
do shell script "mkdir -p " & quoted form of POSIX path of tPath
end makeFolder
但我无法让它只输出“最喜欢”的,它只输出所有的
如果有人能帮我或给我指出正确的方向,我将非常感激
提前感谢只需使用过滤器:
export (get media items of album tName whose favorite is true) to (tFolder as alias) without using originals
塔克斯。我会试试看,然后告诉你。