iphoto is a command line shell for iPhoto.
# start the shell
# run a single command
% iphoto merge album1 album2
THIS IS EXPERIMENTAL SOFTWARE! USE AT YOUR OWN RISK!
This script provides a shell for iPhoto. Make a backup of your photo library, or use a test library, to play with this script.
I last tested this with iPhoto 6.
These commands interact with iPhoto, and some of them will change your iPhoto library, including deleting photos forever.
The "show" command makes iPhoto display something, while the "print" command makes the shell display something. For instance, "show boat" will tell iPhoto to display the album "boat" just as if you had selected it from iPhoto's albums pane. The command "print albums" will print on the terminal (not the printer!) the list of albums.
Although some photos may disappear from albums or the photo library, they are simply in the Trash library, and you do not delete them until you use the "empty" command. However, since I am still developing this script, I have disabled that command. You can still use the command, but it will not empty the trash. To enable the "empty" command, find the "empty_trash" subroutine and modify the source according to the comment in the subroutine.
turn on extra output
empty the trash (you cannot recover these photos).
display available commands
make an album named ALBUM_NAME
merge ALBUM1 ALBUM2
move everything from ALBUM2 to ALBUM1, and remove ALBUM2
move the selected photos to ALBUM
stop the shell
print [ album | albums | photo | photos | selection ]
Rrint information about the specified object. What these actually print changes everytime I look at the source, so you have to try them to see.
Remove the album. The photos stay in the photo library.
Tell iPhoto to display ALBUM
Put the selected photos in the trash
Print the shell version
view [ import | organize | edit | book ]
Change the view. The default is "organize", and using any unknown view changes it to "organize".