[iBook] iPhoto albums and aliases
Angus Wallace
angus.wallace at flinders.edu.au
Tue Feb 14 14:20:58 PST 2006
Hey all,
I have another funny question..
iPhoto 4 had a nice function. It made a folder called 'Albums' inside the
'iPhoto Library' folder. In this Albums folder is a folder for every album in
one's iPhoto library - these contain aliases (symbolic links) to the actual
files in the library. This is really convenient if you want to use more than
one photo management program to access your photos.
Unfortunately, iPhoto 5 no longer does this. I've had a quick go at writing an
Applescript to do so - it doesn't quite work (but I've included it below, just
in case it's of use to anyone). It takes *bloody ages* to execute..
Has anyone else in the list encountered this? Does iPhoto 6 make these folders?
Does anyone know of another way to do this?
Any help/suggestions appreciated..
Cheers,
-Angus
---------------- 8< ----------------------
set destination_folder to "MUSIC:photos:Albums:" --this is the folder
containing the library
set photo_loc to {}
set corr_album to {}
set AlbumNames to {}
tell application "iPhoto"
set theAlbums to (name of every album)
repeat with i from 4 to the (count of theAlbums)
set thisAlbum to item i in theAlbums as string
set the end of AlbumNames to thisAlbum
-- display dialog thisAlbum
set thePhotos to (photos of album thisAlbum)
repeat with thisPhoto in thePhotos
set the end of photo_loc to image path of thisPhoto
-- display dialog image path of thisPhoto as string
set the end of corr_album to thisAlbum
end repeat
end repeat
--display dialog (count of photo_loc) as string
-- display dialog AlbumNames as string
--display dialog (count of AlbumNames) as string
end tell
tell application "Finder"
repeat with j from 1 to the count of AlbumNames
if not (exists folder (item j of AlbumNames as string) of folder
destination_folder) then
make new folder at folder destination_folder with properties {name:(item j of
AlbumNames as string)}
end if
end repeat
-- display dialog (count of photo_loc) as string
repeat with i from 1 to the count of photo_loc
--display dialog {destination_folder & (item i of AlbumNames as string) &
":"}
--display dialog (item i of photo_loc)
make new alias file at folder {destination_folder & (item i of AlbumNames as
string) & ":"} to (item i of photo_loc) with replacing
display dialog (item i of photo_loc)
end repeat
end tell
More information about the iBook
mailing list