PDA

View Full Version : Automator help, please....


turtle
2007-02-28, 13:27
I'm trying to come up with a photo workflow that will better suit my needs. Automator seems like it will do what I need. The problem is I don't know a thing about Automator. :\

Here's what I would like it to do:
1) I insert CF card
2) CF card is stripped into a folder for .jpg and another folder for .cr2 (RAW). (I would like to be able to change the RAW file type or add other RAW type incase I should move away from Canon in the future too.)
3) Eject CF card
4) Burn folder is created for each separate folder while adding Abode DNG converter for both Windows and Mac to each burn folder.

This will enable me to burn the images to a backup DVD/CD (based on size) while having universal conversion ability with the DNG converter should support be dropped much later down the line. I have Toast 7, so it can be used to create the burn folders for max compatibility.

I just don't know how to go about doing this. I opened up Automator but I end just just giving it a blank stare.
Thanks!

chucker
2007-02-28, 15:47
(edit) Never mind, this should be all possible, though you have to manually select the card's items (and twice, to boot), and also manually eject it afterwards.

Here's what I'm thinking:

1) New Folder for JPEGs.
2) New Folder for RAWs.

3) Ask for Finder items, Files and Folders, Allow Multiple Selection. This is where you manually navigate to your CF card and just select all.
4) Filter Finder Items, Name Extension equal to "cr2".
5) Move Finder Items. Specify the RAW folder we just created as the destination.

6) Ask for Finder items, Files and Folders, Allow Multiple Selection. This is where you manually navigate to your CF card and just select all.
7) Filter Finder Items, Name Extension equal to "jpg" this time.
8) Move Finder Items. Specify the JPEG folder we created as the destination.

9) Get Specified Finder Items. Here we select the two folders, and then add the DNG converters into the mix.
10) Burn a Disc. No-brainer.

This leaves the CD with four items in its root: the JPEG folder, the RAW folder, and the two DNG converters.

Suddoo
2007-02-28, 17:11
^ chucker im sure you can find a 'select all in folder' on the internet somewhere..

There are also many sites on the internet that have free 'libraries' of automator commands that you can use. V usefull !

turtle
2007-03-01, 00:11
chucker:Thanks for the input. I'll play with this some over the week and see what I can make of it. I'll even post my results once I get it either accomplished, or I get stumped.

Suddoo:Got any links? I'm not sure what I'm searching for. :\

Kickaha
2007-03-01, 01:09
You know... would it be possible to write a Folder Action and attach it to /Volumes to watch for the CF card being mounted?

chucker
2007-03-01, 01:17
Suddoo:Got any links? I'm not sure what I'm searching for. :\

Half a minute of yahooing:

http://www.apple.com/downloads/macosx/automator/
http://www.automator.us/downloads.html
http://www.automatoractions.com/
http://automatorworld.com/
http://automator-actions.com/

You know... would it be possible to write a Folder Action and attach it to /Volumes to watch for the CF card being mounted?

You could probably modify "add - new item alert.scpt" accordingly, yes.

Suddoo
2007-03-01, 13:31
Thanks Chucker!

If you open up the scripts, you can also take a look at the coding and modify it. This sounds daunting I know, but here is an example of the applescript code:

on substitute()
tell application "System Events"
set iTunesRunning to (name of processes) contains "iTunes"
end tell
if iTunesRunning is true then
return EndResult()
else
return "I'm sorry, iTunes is not running."
end if
end substitute

easy! You can tweak current scripts in this way, by opening them up in the 'script editor'.

:D

turtle
2007-03-19, 15:42
What about setting Image Capture to open and Automator action?

http://kellyent.dyndns.org:8080/an/imgcap.png

If we had an Automator action created, shouldn't we be able to set Image Capture to run that action and then accomplish my tasking? Will this work? I haven't tried it yet because I'm pressed for time and I just thought of this. This seems to fit the idea behind Kickaha's Folder Action idea.

chucker
2007-03-19, 17:32
What about setting Image Capture to open and Automator action?

http://kellyent.dyndns.org:8080/an/imgcap.png

If we had an Automator action created, shouldn't we be able to set Image Capture to run that action and then accomplish my tasking?

Well, I'm not sure, but how about setting it to Image Capture and setting its action (in the toolbar) to an Automator action?

turtle
2007-03-20, 08:21
Is there and "If Then" command for the Finder actions in Automator? I have decided to add a PDF contact sheet to the folders but if there isn't a JPEG or RAW file then the workflow fails at that point and doesn't go on.

I guess I could break them up into more individual workflow pieces and have one Automator workflow the goes from one work flow to the next, but if I do that will it fail because one of the workflows failed?

chucker
2007-03-20, 08:30
I don't believe Automator supports conditionals directly.

turtle
2007-03-20, 08:30
I should add that so far I have the configuration set so when I connect a camera (either physically or via card reader) it creates the folder and moves the files into the correct folders. Including copy DNG converters for Win and Mac into the RAW folder.

Edit: Boo hoo. I'll figure something out then.

turtle
2007-03-20, 09:33
Is there a way I can rename a folder with dynamic settings? I.e., date in YYMMDD format, and increment should there be a need for more than one. This would allow my disks to be YYMMDD Archive X, where X is the incremental number. Automator seems to only offer static changes.

Edit: Never mind, I figured it out.

turtle
2007-03-20, 12:01
I finally got it working the way I want it. When a camera is connected, or a card reader has a card inserted, Image Capture runs the app I mention next. This causes a chain reaction to totally automate the archiving of my images. I have my printer set the attribute on the card reader to read-only to prevent data loss (minimize anyway).

I first created a workflow that is saved as an app: New Folders Then Download. This workflow creates two folders on my desktop (To Burn, Temp) and two folders inside the "To Burn" folders (RAW, JPEG). It then copies a folder containing both versions of DNG converter into the "RAW" folder. This way if the apps are updated I can copy the updated apps into the folder rather than having to change the workflow/app.

Since Automator doesn't handle variables well, I then created 4 other workflows saved as workflows. So in the original app/workflow, after completing the folder creation it moves onto workflow number 1; Camera Download.

Here the camera/card reader is downloaded of all images and videos and they are placed in the Pictures Directory (default for Image Capture). Then it moves all the downloads to the second desktop directory (Temp). Then it moves all files who's extension starts with "J" to the JPEG folder. I did this because I've seen some saved a JPG and some saved as JPEG. It then moves all files ending in CR2 to RAW. Then it finds and moves AVIs to the Movies folder (My wife's P&S does movies that my daughter loves to use). It then finds the THM files and moves them to the Trash.

Workflow 2: Create JPEG Contact Sheet
This one simply finds the files that start with "J" in the JPEG folder and creates a PDF Contact Sheet which is saved in the root directory of "To Burn".

Workflow 3: Create RAW Contact Sheet
Same as #2 but it finds files that start with "C" in the RAW folder and also places the result in root of "To Burn".

Workflow 4: Move and Rename
This is currently the final step and it does as the name implies. It finds the folder "To Burn", moves it to one of my external drives and then renames it to Photo Archive. The date in YYYYMMDD_ is then added to the front of the folder name. Then a -XX is added to the end to make it sequential (XX being the incremental number starting with 01).

So far this is working really well for me. Since I don't have a DVD burner on my Mini yet, I'm not bothered that I'll have to manually do that step. Plus, Toast isn't integrated into Automator yet. I had to create separate workflows for the contact sheet creation because it doesn't handle broken workflows at all. If there are no RAW images then it stops the workflow completely rather than skipping it. This way it just moves onto the next step if there are no RAW files (or JPEG). This leaves the Temp folder on the desktop so I can verify all the images were moved where they needed to be. If there were duplicate file names, they are left behind in this folder and I can figure out what I need to do with them from there.

I just shot 600 images to fill my CF card with RAW + JPEG to see how long it takes and to test it out from start to finish. I'm glad I got the Extreme 3 now! It's still taking forever to download though.

Short overview:
CF card inserted into card reader. Image Capture runs workflow saved as app named "New Folders Then Download". A folder named Temp is left on the Desktop with any straggler files while the rest of them are sorted into a folder named 20070320_Photo Archive-01 and it is located on one of my external drives. In there are two contact sheets and two folders. Folder JPEG has all JPEG images while the folder RAW has all CR2 images and a folder with DNG converters for both Mac and PC in it. If there is no contact sheet for a certain file type then I know there a no image files of that type.

If you think this might help you, PM me and I'll send you my Automator workflows and the app. A special only for AN members. :)

Edit: You'll want to add one the steps where it creates the the Contact Sheets to follow the PDF creation with conversion to image files and then renaming. 300 CR2 files came to a 2.7GB PDF. :eek: 300 JPG came to 2.2GB.

turtle
2007-03-20, 19:26
Ok, it takes about 3 hours on my G4 Mini to run the full course. Although it isn't the full course really. I'm having a problem with the Render PDF Pages as Images action. Does anyone have a working workflow they can email me? For some reason it isn't working right here. Google isn't turning up anything. I'm guessing it's because Apple gave us the command so no one else is reinventing it.

I'm gonna run through this on my wife's MB and see how much faster it goes on there. Creating the PDF contact sheets is what takes so long.