Home > Guides/How To's, Technology > Share your Aperture Images with Everyone, Everywhere!

Share your Aperture Images with Everyone, Everywhere!

If you want to share your Aperture images with anyone, using any device, anywhere in the world and never worry about losing your images, read on!

Like many people I have more than one type of device connected to my home network. For me it’s a Mac, a couple of Windows laptops, a Windows media server, an Xbox and a PS3.

This tutorial will guide you through the steps needed to share your Aperture albums on your home network as well as with your friends and family over the internet quickly and easily.

Assuming you already have everything in your home connected to your home network, let’s get started….

The Solution

First the images are exported from Aperture onto a Media Server. The Media Server is then used to share the images to everything else.

I personally prefer to have a separate Media Server, however this solution could also be implemented without a separate media server, by exporting images and installing all software directly onto the Mac.

Take a look at the image below which shows the overall solution.Aperture Export Sync Solution

Exporting the Images from Aperture

Images are exported from Aperture using a custom Aperture Export utility, this can be run everytime you create a new project to ensure that all your shared images are up to date. This is described in a later section of this article.

Sharing the Images with the PS3 and Xbox

Both the PS3 and the Xbox support an open protocol named DLNA (www.dlna.org). This has become the standard way to share and play media around the home. If you look for it you will see the DLNA logo on more devices than you think, including stereo systems, TVs, media software and NAS devices.

For more info including a full list of products certified to work with DLNA click the DLNA link above. DLNA also supports the streaming of movies and music to all compatible devices around your home, so after sharing your images around your network, why not share your other media too!

To share the images with a PS3/Xbox or any other DLNA compatible device I recommend Twonky Media Server (http://www.twonky.com/products/twonkyserver/) its $19.95 and worth every penny/cent whatever….

You simply install the software on your media server (Windows, Mac or Linux) and configure it to share out your files. The configuration is so simple it doesn’t warrant a step by step tutorial.

Twonky is excellent and I strongly recommend it, however feel free to check out the alternatives below.

Getting the Images onto the Cloud

“Cloud” is used generally to refer to a service someone else manages which you consume over a network, you don’t need to know how the company does what they do, simply how to use their service.

For this tutorial, our cloud is an internet based backup service that we copy all the Aperture images to.

This means two very important things:

  • All the images are backed up to the internet service. So if anything ever happened like a cooked hard drive, or fire etc all the treasured images are safe
  • The images can be accessed over the Internet from anywhere in the world

To get the images into the cloud you simply install a client and configure which folders you want to sync. It can take a while though depending on how many files you have and the speed of your internet connection! Once sync’d though it will stay in sync, so whenever you place any new files onto the media server, they will automatically be copied to the cloud.

I strongly recommend SafeSync from Trend Micro. They have an offer on at the moment which allows unlimited storage for a really low price. The client software and website are not the prettiest or easiest to use but the value for money in incredible compared to other similar providers.

SafeSync is available here: https://www.safesync.com/Pages/Welcome however you may want to check out these other providers depending on how many files you have:

Aperture Export Utility

I created this export utility using AppleScript which you can download using the link below.

Rather than publish this as compiled code, I chose to publish the source code for all the budding applescripters:

-- --------------------------------
-- ExportAllProjects_V2.scpt
-- --------------------------------

-- ------------------------------------
-- Nik Ansell (nikansell00@gmail.com)
-- March 2011
-- ------------------------------------

-- ------------------------------------------------
-- Purpose:
-- Exports all images in the Aperture DB in all projects to any folder
-- ------------------------------------------------

-- ---------------------------
-- Pre-Requisites:
-- ---------------------------

-- 1. Ensure that a folder naming policy exists named "Project Name"
-- 2. Ensure you understand what the script is doing before you run it. I will not be held accountable for any issues as a result of running this script!

-- ---------------------------
-- Features:
-- ---------------------------

-- 1. Prompts for the destination folder
-- 1.1 This can be changed by simply uncommenting the section in the script below
-- 2. Promnpt for the folder naming policy, "Project Name" is required for other features to work, please create if does not exist already
-- 2.1 This can be changed by simply uncommenting the section in the script below
-- 3. Exports all images as full size JPEGs
-- 3.1 This can be changed by changing the file naming policy section in the script below
-- 4. Sub folders are created using the image year of the first image in the project (Because "Image Year"in the Dir Naming Policy does not always work)
-- 5. Bypasses Aperture timeout errors
-- 6. Checks if the destination folder exists, if it does exist it skips if the number of images in the folder are the same as the number of images in the project
-- 6.1 Can be set to delate all images in the destination folder before exporting if needed (By choosing "Yes" when prompted
-- 7. Writes all events to a logfile at path: Desktop/Aperture_.txt
-- 8. Logs the total images found, images skipped and images exported
-- 9. Uses the original image name when exporting
-- 10. The export dir can be a network path if mounted before the script starts

-- ---------------------------
-- Known Bugs:
-- ---------------------------

-- 1. Sometimes Aperture does not return all projects, causing some projects to be skipped. This may e related to Known Bug No.2
-- Workaround: Run the script more than once, selecting "No" when prompted: "Delete files from destination folder before exporting?"

-- 2. If more than one project has the same name, all files from all projects of the same name will be placed in the same folder, or the next iteration of the project will be skipped
-- Workaround: Ensure that every project has a unique name. If you find image counts in the summary do not match the destination folders this could be your problem

-- 3. If Aperture is not able to export a file, this breaks feature 6 as the number of images will be less when exported
-- Workaround: Fix the problem and ensure that Aperture can export all images. Try exporting a project manually to test, then work through any issues you find

-- 4. If an image has no date in Aperture it may not be exported
-- Workaround: Find images without a date and choose Metadate->Adjust Date/Time, then restart Aperture

set {year:y, month:m, day:d} to (current date)
global logfilePath
set logfilePath to (path to desktop as string) & "ApertureExport_" & d & m & y & ".txt"
display dialog "Using Logfile:" & logfilePath

-- Get the path to export the files to
tell application "Finder"
set export_dir to (choose folder with prompt "Choose a folder to export into") as alias
end tell

tell application "Aperture"
activate

-- Selecting "Yes" will delete all images in a destination folder, if a destination folder already exists
set question to display dialog "Delete files from destination folder before exporting?" buttons {"Yes", "No"} default button 2
set DeleteFilesBeforeExport to button returned of question

-- Name exported files the same as the name stored in Aperture
-- Change the section below if you'd like a prompt the file naming policy
set file_policy to file naming policy "Version Name"
--set x to name of file naming policies
--choose from list x with prompt "select a file naming policy"
--set file_policy to file naming policy (item 1 of result)

-- Prompt for the folder naming policy to use
-- Change the section below to stop prompt and hard code "Project Name"
--set dir_policy to folder naming policy "Project Name"
set x to name of folder naming policies
choose from list x with prompt "Select a folder naming policy"
set dir_policy to folder naming policy (item 1 of result)

-- Export all images as Full size JPEGs
-- Change the section below to remove the prompt and hard code "Project Name"
set setting_name to "JPEG - Original Size"
--set export_setting to name of export settings
--set end of export_setting to "Master"
--choose from list export_setting with prompt "Choose a file type preset"
--set setting_name to item 1 of result

-- Initialize the log file
my WriteToLog(((current date) as string) & return, "yes")
my WriteToLog("Starting export of all Aperture images using the variables below:" & return, "no")
my WriteToLog(" export_dir: " & export_dir as string, "no")
my WriteToLog(" file_policy: Version Name", "no")
my WriteToLog(" dir_policy: Project Name", "no")
my WriteToLog(" setting_name: " & setting_name as string, "no")
my WriteToLog(" DeleteFilesBeforeExport: " & DeleteFilesBeforeExport as string, "no")
my WriteToLog(return, "no")

-- Set some vars to report the results at the end
set totalimages to 0
set totalimagesskipped to 0
set totalimagesexported to 0
set totalprojects to 0

-- Get all projects and cycle through them
set theplist to name of every project
set totalprojects to count theplist

repeat with p in theplist

set pobj to project p
set skip to "no"

tell pobj
set theimages to every image version as list
end tell

set numImagesinProject to count theimages

my WriteToLog("Found Project: " & p & " - " & numImagesinProject & " images", "no")

set totalimages to totalimages + numImagesinProject

if (numImagesinProject > 0) then

-- Get the year of the 1st image in the project
set sampleimage to item 1 of theimages
set sampleimagename to name of sampleimage
try
set sampleimageyear to value of EXIF tag "CaptureYear" of sampleimage as string
on error number -1700
set sampleimageyear to "0000"
end try
set sampleimageyear to rich text 1 thru 4 of sampleimageyear
set p to p as string
set sampleimageyear to sampleimageyear as string

-- Create the "year" folder if it doesn't exist
tell application "Finder"
if not (exists folder sampleimageyear of export_dir) then
my WriteToLog((" Creating folder: " & export_dir & sampleimageyear), "no")
make new folder at export_dir with properties {name:sampleimageyear}

end if -- if year sub folder does not exist

end tell -- tell application finder

-- Define the export dir in which to place the project folder
-- This is done to avoid two different export locations if a project spans over more than one year (E.G xmas and new year)
set export_subdir to (export_dir as string) & sampleimageyear as alias

-- Set the variable to print to log and check total exported files
set chk_dir to export_subdir & p as string

-- If folder exists, check number of images before exporting
tell application "Finder"
if (exists folder chk_dir) then
my WriteToLog(" Destination folder exists (" & chk_dir & "), counting images", "no")
-- Count images in folder
set chk_dir to chk_dir as alias
set numFilesinFolder to count of (files in folder chk_dir)
set strnumFilesinFolder to numFilesinFolder as string

if (numFilesinFolder ≥ numImagesinProject) then
set totalimagesskipped to totalimagesskipped + numImagesinProject
my WriteToLog(" Found " & strnumFilesinFolder & " files in destination folder skipping", "no")
set skip to "yes"
else
if DeleteFilesBeforeExport is "Yes" then
my WriteToLog(" Found " & strnumFilesinFolder & " Deleting files in folder before export to avoid duplicates", "no")
delete (every item of folder export_subdir)
end if -- if set to delete files in destination folder before exporting

end if -- if destination folder has more files than the project

end if -- if chk_dir exists

end tell -- tell application finder

if (skip is not equal to "yes") then
my WriteToLog((" Exporting: " & p), "no")
my WriteToLog(" To Folder: " & chk_dir, "no")
set totalimagesexported to totalimagesexported + numImagesinProject

if setting_name is "Master" then
with timeout of 3600 seconds
try
--export theimages naming files with file_policy naming folders with dir_policy to export_subdir metadata sidecar
export theimages naming files with file_policy naming folders with dir_policy to export_subdir metadata sidecar
--new to 2.0 is the ability to embed the versions' IPTC data into the master itself. change "sidecar" to "embedded" to do so.
on error number -1712 -- Timeout waiting for a confirmation message in Aperture
my WriteToLog(" Error: Timeout (Error -1712), waiting for a confirmation in Aperture, probably some images couldn't be exported", "no")
end try
end timeout
else
with timeout of 3600 seconds
try
export theimages naming folders with dir_policy using export setting setting_name to export_subdir naming files with file_policy
on error number -1712 -- Timeout waiting for a confirmation message in Aperture
my WriteToLog(" Error: Timeout (Error -1712), waiting for a confirmation in Aperture, probably some images couldn't be exported", "no")
end try
end timeout
end if -- if setting_name is "Master"

-- Check the right number of images were exported
tell application "Finder"
if (exists folder chk_dir) then
set chk_dir to chk_dir as alias
tell application "Finder"
set numFilesinFolder to count of (files in folder chk_dir)
end tell -- tell application finder
set strnumFilesinFolder to numFilesinFolder as string
my WriteToLog(" " & strnumFilesinFolder & " files found in destination folder, assuming all files exported successfully", "no")
if (numFilesinFolder < numImagesinProject) then
set diff to numImagesinProject - numFilesinFolder
set totalimagesskipped to totalimagesskipped + diff
set totalimagesexported to totalimagesexported - diff
my WriteToLog(" Error:Less files found in destination folder, try exporting manually in Aperture to troubleshoot", "no")
end if -- If less files in export folder than in project
else
-- Something went wrong with the export
my WriteToLog(" Error: Could not find destination folder, something went wrong with the export, check for previous errors", "no")
end if -- if chk_dir exists
end tell -- tell application Finder

end if -- if skip not equal to yes

end if -- if more than 0 files in project

end repeat -- repeat with every project

my WriteToLog(return & "Finished", "no")
my WriteToLog(((current date) as string) & return, "no")
my WriteToLog("Total Projects Found:" & totalprojects & return & "Total Images Found:" & totalimages & return & "Total Images Skipped:" & totalimagesskipped & return & "Total Images Exported:" & totalimagesexported, "no")
--display dialog "Total Projects Found:" & totalprojects & return & "Total Images Found:" & totalimages & return & "Total Images Skipped:" & totalimagesskipped & return & "Total Images Exported:" & totalimagesexported

end tell -- tell application Aperture

on WriteToLog(text2write, init)

set AppleScript's text item delimiters to ""

try
set fileRef to open for access logfilePath with write permission
try
if (init is "yes") then
-- Clear file contents
set eof of fileRef to 0
write text2write & return to fileRef
else
write text2write & return to fileRef starting at eof
end if -- if init value set to "yes"
end try
close access fileRef
end try
end WriteToLog

Feel free to use or modify the script in any way you choose.

However run the script at your own risk. Please do not run it unless you are comfortable with what it does! J

A few things you may want to know about this script are in the following sections.

What it does

1.     Extracts all Aperture images in your library to a folder of your choice. This can be a local or remote folder, as long as the folder is visible in the Finder application

2.     The following options are used when exporting:

Export Folder Format: <ExportFolder>/Year/ProjectName/

Export Image Format: JPEG – Original Size

3.     Additional Features:

a) Aperture timeout errors are bypassed

b) Skips the exporting of a project if the destination folder already exists, this allows the script to be re-run at any time and it will only export new projects. If you wish to override this feature select “Yes” when asked by the script.

c) Writes progress to a log file <Desktop>/Aperture_<date>.txt

How to use the export script

1.     Copy and paste the source code above into the Applescript editor and click “Compile”

2.     Read through the script and make sure you are happy with what it is doing

3.     Save the scpt file using the “Save As” in Applescript editor to any path you will remember

4.     Run the script by clicking “Run” in the Applescript editor

5.     The script will diaplay a message box with the path to the log file. Open this log file in the Apple logfile viewer as this will automatically update as the script logs it’s actions

6.     You will then be prompted for a path to export your images, make sure this path points to a location on your media server if you are using a media server to do the rest of the sharing. If not choose a location on you Mac

7.     Once the path is selected you wil be prompted to chose if you wish to delete files from the destination folder before exporting. Choose “No” if you want to only export new images

8.     You are now prompted with to choose a folder naming policy, select “Project Name”, if this doesn’t exist create one in Aperture by selecting any image, clicking “Export” then next to “Sub Folder Format” click “Edit” then click “+” to create a new folder naming policy

9.     The script will now export all the images to the chosen location, you can track the progress by opening the log file with any log file viewer

Known Bugs
  • If more than one project has the same name, all files from all projects of the same name will be placed in the same folder, or the next iteration of the project will be skipped
  • - Workaround: Ensure that every project has a unique name. If you find image counts in the log file summary do not match the destination folders this could be your problem
  • For many reasons Aperture may not be able to export an image. If you see errors in the log file, try to export the project manually then work through any issues as they arise
  • If an image has no date in Aperture it may not be exported
  • - Workaround: Find images without a date and choose Metadate->Adjust Date/Time, add the correct data then restart Aperture and kick off the script again

Please let me know how you get on by leaving a comment below.

Thanks for reading.

About these ads
  1. April 19, 2011 at 4:55 pm | #1

    Hi,

    Very nice writeup and script, thanks!

  2. cary
    July 9, 2011 at 11:03 pm | #2

    Hi Nik,

    can you tell me how to do the following: “Ensure that a folder naming policy exists named “Project Name””

    I have looked all over the Aperture interface and can not find where this is set (beyond the presets). The applescript api docs tell me to set this in the interface (where?), the internet doesn’t help much either. If you can quickly tell me where I would be most appreciative.

    thank you,

    Cary.

  3. July 10, 2011 at 4:41 am | #3

    Hi Cary,

    Thanks for your comment.

    A file/folder naming policy can be created from the initial “Export” dialogue, simply follow the steps below to create a new folder naming policy:

    1. Click on any image in Aperture
    2. Click File->Export->Version
    3. Click the drop down next to “Subfolder format”, then click “edit”
    4. At the next window, click the “+” sign at the bottom left
    5. Enter “Project Name”, for the new polcy
    6. Clear all fields in the “Format” box by selecting inside the box and using backspace
    7. Drag and drop “Project Name” from the “Include” section into the “Format” box above it
    8. Click OK to save the new policy and close the “Folder Naming” dialogue
    9. You can now click “Cancel” on the “Export” dialogue and the “Project Name” folder naming polcy will remain

    If you get any problems, feel free to get in touch.

    Kind Regards,
    Nik

  4. cary
    July 10, 2011 at 11:41 pm | #4

    Hi Nik,

    thanks for the reply. I followed these instructions and when I get the presets list I have a ‘Project Name’ listed already, but i went and created another to see what would happen. Looks like I am getting the same error.

    error “Aperture got an error: Can’t get folder naming policy \”Project Name\”.” number -1728 from folder naming policy “Project Name”

    btw, is there anyway of getting a .txt file of your script? the copy and paste from the site has an incorrect encoding and I needed to fix character issues before applescript would allow for the script to compile. Maybe I screwed something up in my finding and replacing characters.

    Regards,

    Cary.

  5. July 11, 2011 at 8:26 pm | #5

    Hi Cary,

    I can’t upload a txt file to the blog, it only allows media files from what I can gather.
    It does sound like a file format issue for some reason.
    Have you tried pasting into a text editor first, then copying and pasting into the Applescript editor?

    Kind Regards,
    Nik

  6. July 11, 2011 at 8:36 pm | #6

    Hello Again Cary,

    I have fixed the problem.
    Wordpress was somehow changing some of the characters in the script part of the post.
    Wrapping the script text in tags seemed to fix it.
    Please give it a go and let me know how you get on.

    Kind Regards,
    Nik

  1. February 11, 2013 at 7:16 am | #1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: