Using Aperture with Automator


Automator is an application that's included with OS X version 10.4 and later. With Automator, you can easily create custom automation routines that can perform complex tasks for you. Automator performs actions, or individual commands, such as Choose Projects or Set IPTC Tags. An action relays data to the next action. A string of actions constitutes an Automator workflow. With Automator, you can easily build simple automated workflows that can be saved as standalone applications or attached to folders.

For example, you might use Automator in conjunction with Aperture to

  • Create a special "hot folder." You can configure this hot folder so that any images dropped into it are automatically processed by Aperture. For example, you could specify that the images be assigned specific keywords, and tagged with particular IPTC tags.

  • Create a standalone application that automatically exports all of the images from the selected project, compresses them into a ZIP archive, and then uploads them to an FTP server.

  • Automatically open an image in Adobe Photoshop and perform operations using tools that aren't available in Aperture, and then save the image directly back into your Library.

Automator is handy not only because it allows you to automate tasks within Aperture, but also because it lets you automate processes that span multiple applications.

Building an Export Workflow

The easiest way to learn Automator is to start using it. In this exercise, we're going to build a simple workflow that exports all of the images in an album, compresses them into a ZIP file, and then attaches that ZIP file to a message using Apple's Mail.

1.

Open Aperture. Then open Automator. You should find it in your Applications folder.

An empty Workflow document will appear.

The Library pane on the left side of the Workflow window displays all of the currently installed applications that can be controlled by Automator.

2.

Click the Aperture icon in the Library pane. All the Aperture actions you can execute from within Automator will be displayed in the Action pane.

3.

Click each action in the Action pane. A description of what the action does appears in the panel in the lower left corner of the Workflow window.

In Automator, you link actions together to create a workflow. A workflow simply does a bunch of tasks that you would normally perform by hand.

Creating the Workflow

To create a workflow, it's best to think about how you would perform a series of tasks if you were doing them manually. In this example, the first thing we want to do is export the images; so if we were driving Aperture ourselves, we would need to select the album of images we want to export.

Once you've decided what task you want to perform, look through the Action list to find the action that appears to do that task.

1.

Click the Choose Albums action.

The description says, "This action will pass references of the chosen Aperture albums to the next action in the workflow." Automator workflows function by passing chunks of data from one action to the next for processing.

2.

Double-click the Choose Albums action to add it to the workflow. It will appear in the Workflow pane on the right side of the window.

In the Workflow pane, you'll see a panel that contains controls for configuring the action. For the Choose Albums action, you'll see a list of all of the albums in your current Aperture Library.

3.

Select the checkbox next to one of your albums.

4.

In the Action pane, double-click the Export Versions action to add it to your workflow just beneath the Choose Albums action.

Notice there is a link between the two actions.

The link between the actions indicates that data is flowing from the first action to the second. In this case, the name of the album that you selected in the Choose Albums action is being passed on to the Export Versions action.

Now you need to configure the Export action.

5.

In the Export Versions pane select "JPEG Fit within 640 x 640" from the Export Preset pop-up menu.

The items in this menu are simply the Export presets defined in Aperture. In this case, we're telling the Export Images action to export JPEG images that have been resized to fit within 640 x 640 pixels.

6.

From the Destination pop-up menu, choose Other.

7.

In the dialog that appears, create a folder on the desktop called Test Export.

8.

Click Open.

This is the location that Aperture will export your images into.

Note that at the bottom right of the Export Versions action, the output indicator says Files/Folders. This indicates that this action passes the name of a folder, in this case Test Export. This is good news for the rest of our workflow.

Compressing the Folder

After the workflow exports the images, we need it to compress the folder as a ZIP file and archive it. Aperture can't perform this function, so we'll tell Automator to use a different application.

1.

Select Applications at the top of the Library pane.

The Search function at the top of the Workflow window searches the currently selected Library item. We select Library before searching to ensure that the entire Library of actions gets searched.

2.

In the Search field, enter zip.

The Action pane shows the results. Most likely, you'll only have one entry, Create Archive. However, if you've installed any other applications that provide Automator support for file compression, then they'll appear here also.

3.

Double-click the Create Archive action in the Action pane to add the action to the end of the workflow.

Now we need to configure the Create Archive action to tell it where we want the ZIP archive placed.

4.

In the "Save as" field, enter a name for the archive. In this case, enter test archive. Leave the Where pop-up menu set to Desktop.

Setting up Mail

So, our workflow begins by selecting an album in Aperture, and it then exports the contents of that album to a folder. That folder is compressed into a ZIP archive on the desktop. Now we want to create a new message in Mail and attach the ZIP file to that message.

1.

In the Search field, click the small X on the right side to clear the search criteria.

We want to be able to view all of our actions now, not just the ones that have to do with Zip compression.

2.

In the Library pane, click Mail to view the Mail actions provided. In the Action pane, you should see New Mail Message.

3.

In the Action pane, double-click New Mail Message to add it to the end of your workflow.

Note that our workflow is now running Mail instead of Aperture. You can move seamlessly from one application to another in a workflow without having to issue any special commands.

4.

Configure the Mail message as desired. If you want, you can go ahead and fill in address and subject lines, or leave them blank and fill them in after running the workflow.

5.

In the Action pane, double-click Add Attachments to Front Message.

This will add the archive created in step 3 of our workflow to the new Mail message created in step 4.

At this point we could add a Send Outgoing Message action to the end of our workflow, which would cause our new Mail message to be sent. We don't want to actually send the mail; we just want the message to be prepared, so we're going to end the workflow here.

6.

Choose File > Save and save the workflow on your desktop. Name it Export Album to Mail.

Now, anytime you want to perform this series of tasks, you can simply double-click the Export Album to Mail file to open it in Automator.

7.

Click the Run button in the upper right corner of the window, or press Command-R.

Automator will begin executing your workflow. A progress indicator in the lower left corner of each action will show where the workflow is in its execution. Depending on the size of the album you choose to export, and the speed of your computer, the workflow may take more or less time. When it's finished, you should have a new, empty message in Mail, with a ZIP file attached to it. You can now address and send the message.

This workflow demonstrates one of the biggest advantages of Automator: its ability to employ multiple applications. However, to make your workflow even more useful, you'll want to give more thought to how you save it.




Apple Pro Training Series(c) Aperture 1.5
Apple Pro Training Series: Aperture 1.5
ISBN: 0321496620
EAN: 2147483647
Year: 2007
Pages: 190

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net