Thursday, 25 August 2011

Automate your Photo Workflow - Part2

In my previous blog Automate your Photo Workflow I discuss setting up your Rakefile and running your first automated task: Ordering your Photo, Video, GPS files. In this article we will import the ordered photos into Aperture and create backup DVDs.

4. Import Photos, Videos into Aperture
Before running this task, it assumes you have completed the previous task of ordering your photo files into date folders. This task will import all photo and video files from your External hard drive (as references) into Aperture as shown in Figure 5.
Figure 5. Import files from Hard Drive to Aperture
Before running this task, you have the option to rename your folders in your external hard drive (PHOTO_MASTERS_FOLDER in Rakefile). You must NOT change the date in the folder name, but you can add text after the date in the folder name. For example in the folder:
20110819
you can change to
20110819 Melbourne Trip

The 20110819 must be at the start of the folder name, so "Melbourne Trip 20110819" will not work. The renaming of folders is optional. When the folders and files are imported into Aperture, it will keep the same folder name in Aperture. For example here is part of my external photo hard drive folders:
Figure 6. My external photo hard drive folders for 2011
The colours I have set in my hard drive have no impact in the import process. I use it to quickly identify family trips (blue) and my hiking trips (green). Colouring the folders is totally up to you and are not used in any part of the tasks.

During the import task, it will read the folder names on the external hard drive, and then create a folder with exactly the same name in Aperture if it does not exist yet, then import all files to the same folder. Here is what my 2011 folder looks like in Aperture.
Figure 7. My 2011 Aperture Library
The import task uses Applescript to open Aperture. It first checks inside the folder if the file to import already exists. If the file does not exist in Aperture, it will import it, so it does not rely on Aperture for checking duplicates.

Unfortunately there is a bug or an omission in Applescript for Aperture, it does not import some video files (as of writing). Hopefully this will be fixed soon, but for now you if this task misses importing a video file, you will have to manually import the video files into your folders.

After the task is complete there is some text that will notify you of what it did and did not do.
  • A number of photos that were not imported
  • A list of files that Aperture failed to import
  • A count and list of files that were duplicates that were not imported
  • A list of files that could not be found in the external hard drive
To explain the last possible error further. The task reads from the PHOTO_ORDERED_FOLDER for all the files to import, but then gets Aperture to get the reference of the matching file from the external hard drive in the PHOTO_MASTERS_FOLDER as seen in Figure 5. Aperture should always get a reference from the external hard drive and not your own machine. That way you can safely remove photo files from your own machine, freeing up room for other things. The reason it gets a list from the PHOTO_ORDERED_FOLDER is this folder contains only the most recent added photo files and not the complete library as in the external hard drive. The process goes a lot quicker with this approach.


If you havent created a new "Test" library in Aperture, I suggest you do it now before running the task.

To run the task use the command
rake photos:import_photos

It first stops the process to ask you if you have renamed the folders. I did rename my folders as seen below. Press 'y' enter to continue.
Figure 8. Renamed folders
The results:
**** NOTE: To date, Aperture 3 does not support importing video through Applescript! You will need to do these 
through GUI. A list will be given at end.
Have you updated Backup drive folder names and ready to import [y/N] (You can add brief description on folder 
name after date, eg folder '20110130' can become '20110130 Melbourne Trip'. Make sure you keep date at front.)
y
ans=y
Importing photos...
** will import /Users/rolf/PicturesTest/Backup/Photos/2011/20110514 Brooke/IMG_0495.JPG
** will import /Users/rolf/PicturesTest/Backup/Photos/2011/20110514 Brooke/IMG_0496.MOV
** will import /Users/rolf/PicturesTest/Backup/Photos/2011/20110814 Brown Hill Creek/DSC_6940.NEF
** will import /Users/rolf/PicturesTest/Backup/Photos/2011/20110814 Brown Hill Creek/DSC_6941.NEF
** will import /Users/rolf/PicturesTest/Backup/Photos/2011/20110814 Brown Hill Creek/DSC_6942.NEF
20110514 Brooke => 2 files
20110814 Brown Hill Creek => 3 files
---
====== Project folder=20110514 Brooke ======
  Create Aperture folder 2011
  Create Aperture Project 20110514 Brooke under 2011
====== Project folder=20110814 Brown Hill Creek ======
  Create Aperture Project 20110814 Brown Hill Creek under 2011

There were no errors listed at the end of the results, so all went well.
Here is what my Test Aperture Library looks like:
Figure 9. My Test Aperture Library after running the import task

5. Create Backup DVDs
You can never have too many backups of your photos. This task will backup all your new photos onto DVDs. DVDs are a cheap source of backup. There are other forms of backup like online storage. For now I have decided to stick with DVDs. I create two copies of each DVD. I keep one in my home, the other I send of to my brother to keep, and he gives me all of his DVDs. That way if my house burns down, I loose my external hard drive and DVDs, but my brother will have a copy.

This task will create Mac burn folder(s) in DVD_BURN_FOLDER with symbolic links from your files in the PHOTO_ORDERED_FOLDER. If there are not enough files to fill up a DVD, the task will do nothing but let you know the DVD is not full.

Figure 10. Create DVD burn folders

The task will use the date folders as seen in the PHOTO_ORDERED_FOLDER in the DVD burn folder, so it will look the same. When the DVD is full, it will continue the folder on the next DVD. So this means it will split folders over DVDs. If there is enough files to create more than one DVD, it will go ahead and create as many DVDs as it can.

To run the task:
rake photos:prepare_dvd

If I run this task with the few files I have in my PHOTO_ORDERED_FOLDER this is what will happen.
Preparing DVD...
Total Size     :        53,823,888 (0 discs were created)
Remaining Size :        53,823,888 (1% full)

It tells us it did not create a DVD, but also how full the DVD is. In my case its only 1% full.

For illustration purposes only, I will throw a stack of photos in my PHOTO_ORDERED_FOLDER so we can see the results of creating a DVD.
Preparing DVD...
===========================
Create Burn folder /Users/rolf/PicturesTest/Photos_1.fpbf
Total Size for Disc:4,513,892,794 (370 files)
/Users/rolf/PicturesTest/Ordered/2011/20100726/D30_3136.NEF -> /Users/rolf/PicturesTest/Photos_1.fpbf/20100726/D30_3136.NEF
/Users/rolf/PicturesTest/Ordered/2011/20100726/D30_3137.NEF -> /Users/rolf/PicturesTest/Photos_1.fpbf/20100726/D30_3137.NEF
...
Total Size     :     7,258,166,931 (1 discs were created)
Remaining Size :     2,744,274,137 (58% full)
Burn Folders created:
  /Users/rolf/PicturesTest/Photos_1.fpbf

You are now ready to burn your DVDs.

My burn folder contents can be seen in Figure 11. Folders are not symbolic links, but all files are  symbolic links.
Figure 11. My DVD burn folder

You can change the "Photos" Burn folder prefix with BURN_FOLDER_PREFIX found in the Rakefile. Numbers will continue to increment.

6. Move burnt folders
Once you have completed burning all your DVDs you will move the files from the PHOTO_ORDERED_FOLDER to PHOTOS_BURNT_FOLDER as seen in Figure 12.
Figure 12. Move all files from Ordered Folder to Burnt Folder
Once your files are moved to the Burnt folder you can safely delete them from your machine from the Burnt folders. This will free up space on our machine for other things. Aperture does not reference the files on any folder on your machine, it references the photos on your external hard drive.


This task will only move the files that have been burnt, not folders. So it reads the files in the DVD burn folders as seen in Figure 10 for a list of files to move. It then uses this list to move the matching files from the ordered folders to the burnt folders. So it wont move files that have not been burnt on a DVD yet.

To run this task use the command:
rake photos:move_burnt_files

Results:
Moving files from /Users/rolf/PicturesTest/Ordered to /Users/rolf/PicturesTest/Burnt...
0 files moved.

Click the Next link for Part 3 of my blog.

PreviousNext

No comments:

Post a Comment