From the "I am too stupid for this" department

by Volker Weber

Automator is one of those great promises of Mac OS X Tiger which never worked for me. In theory, everybody should be able to plug a few actions together to automate repeating chores. But I am too stupid for this.

Let me give you a sample workflow that should kick in once I connect my camera:

  1. Create temporary folder
  2. Copy all photos from camera to folder
  3. Open a bash shell
  4. cd to the temporary folder
  5. Run perl script ~/bin/exifcleaner.pl with parameter -p
  6. Import photos into iPhoto
  7. Remove photos and temporary folder

Copying from the camera is too hard? OK, assume the photos are already in the folder.

Comments

One more reason I'm still using Panther and will be for the foreseeable future.

Adam Merkert, 2005-10-23

This is a complete solution for importing pictures into a directory structure, organized by copying date (eg. .../2005/10/20051025).
"Development time": approx 20 minutes including debugging.
You need to change the processing from cp .../*/*/... to a find invocation when your file list on the CF card would grow beyond the limit of 64k-2 elements (command line arguments to cp in this case).

It would be your turn to add the appropriate osascript invocation for automagic import into iPhoto.
exiftran is a tool for handling EXIF data in JPEG files which is contained in the fbida package. Installation of exiftran and libexif-0.6.x via configure && make install is left as an exercise to the reader.

#!/sw/bin/zsh

###
### copy files from the digicam to a target folder
### EXIF chunks are normalized and image autorotation with exiftran
### alpha@webmonster.de 2005
###

DT="`/bin/date +%Y%m%d`"
DM="`/bin/date +%m`"
DY="`/bin/date +%Y`"
TRG="/Volumes/PictureStash/Digi"
SRC="/Volumes/EOS_DIGITAL/DCIM"

TRG="${TRG}/${DY}/${DM}/${DT}"

if [ ! -d ${SRC} ]
then
echo "### source not mounted: ${SRC}"
exit 99
fi

if [ ! -d ${TRG} ]
then
echo "### creating ${TRG}"
mkdir -p ${TRG}
fi

echo "### source: ${SRC}"
echo "### target: ${TRG}"
echo "### Trying CRW..."
cp -v ${SRC}/*/*.[Cc][Rr][Ww] ${TRG}
echo "### Trying AVI..."
cp -v ${SRC}/*/*.[Aa][Vv][Ii] ${TRG}
echo "### Trying JPEG..."
for image in ${SRC}/*/*.[Jj][Pp][Gg]
do
echo "${image:t} from ${image:h}"
exiftran -a -o ${TRG}/${image:t} ${image}
done

echo "### done."

Karsten W. Rohrbach, 2005-10-25

Old vowe.net archive pages

I explain difficult concepts in simple ways. For free, and for money. Clue procurement and bullshit detection.

vowe

Paypal vowe