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:
- Create temporary folder
- Copy all photos from camera to folder
- Open a bash shell
- cd to the temporary folder
- Run perl script ~/bin/exifcleaner.pl with parameter -p
- Import photos into iPhoto
- 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.
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."
Post a comment
Recent comments
Paul Farris
on Google syncs address book to BlackBerrys at 12:21
Alan Bell
on Amazing Head Tracking at 16:45
Oswald Prucker
on Google syncs address book to BlackBerrys at 14:36
Kai Schmalenbach
on Apple TV: First impressions at 11:13
Armin Roth
on Google syncs address book to BlackBerrys at 10:47
Gonzague Dambricourt
on Google syncs address book to BlackBerrys at 23:57
Nick Daisley
on Foldershare, R.I.P. at 20:20
peter mojica
on Notes or Exchange? Let's put an end to those creative statistics at 19:42
Armin Roth
on Weihnachtsmüll von Microsoft at 10:33
Michael Sedlaczek
on Weihnachtsmüll von Microsoft at 10:26
Julian Buss
on Use scripts to improve install process for Lotus Notes at 08:36
Philipp Sury
on Apple TV: First impressions at 07:04
Frank Paolino
on New poll: which BlackBerry could be your next? at 05:10
marco foellmer
on BlackBerry Curve 8900 at 00:20
Uwe Brahm
on Foldershare, R.I.P. at 19:03
Nick Shelness
on Foldershare, R.I.P. at 16:55
Nick Shelness
on Foldershare, R.I.P. at 16:43
Ralf M Petter
on Foldershare, R.I.P. at 15:32
Jan Tietze
on Foldershare, R.I.P. at 14:12
Ole Saalmann
on Foldershare, R.I.P. at 13:33
Stefan Weigand
on Doc Scrubber cleans your Word document at 13:21
Doug Petrosky
on Apple TV: First impressions at 13:00
ursus schneider
on Apple TV: First impressions at 09:16
Armin Roth
on Doc Scrubber cleans your Word document at 08:56
Volker Weber
on Foldershare, R.I.P. at 08:28



