Friday, July 9, 2010

Quick and dirty Hipstamatic print workflow

I love the Hipstamatic app for my iPhone (now I really wish I had an iPhone 4), but getting the prints out of the app and into Aperture with the Lens and Film information intact has proven to be quite the challenge. I think I finally did it, so let me share how it works for me (on a Macbook Pro):

Warning: You should be familiar with the Terminal and UNIX command line if you want to follow these steps!

This works for me. I might work for you. It also might destroy all your data and impregnate your cat. I take no responsibility. Use at your own risk!

I use the following software to make all this work:
  1. Hipstamatic (well, DUH!)
  2. Photo Grabbr
  3. exiftool
  4. Aperture


I found Photo Grabbr and exiftool through Google, so I'm sure you will too.

First I publish all the prints from Hipstamatic app to Flickr:
  1. Create Set
  2. Add 9 images to set
  3. Publish set to Flickr
  4. Rinse and repeat until all images have been taken care of
In Flickr, move all the newly uploaded images into a set (I have called the set *surprisesurprise* "Hipstamatic").

On your Mac, use the program "Photo Grabbr" to download all the pictures from your Flickr set onto your harddisk.

Now you have the prints on your computer, just the way they were created in the Hipstamatic. Unfortunately (at least in my case), the keywords and image dates were not readable in Aperture, and the geoinformation was wrong (longitude was west instead of east). So I created a bit of shell script magic to remedy that.

I use this script to fix the dates and keywords:


#!/bin/bash

while [ -n "$1" ] ; do
# Extract Date (dt) from File
dt=`exiftool "$1" | grep "Modify Date" | cut -b 35-53 | sed "s/\-/:/g"`
# Convert to TouchableDate (touchDate)
touchDate=`echo $dt | sed "s/[^0-9]//g" | cut -c 1-12`
touchDate2=`echo $dt | sed "s/[^0-9]//g" | cut -c 13-14`
touchDate=`echo $touchDate.$touchDate2`
keywords=`exiftool -Software "$1" | cut -c 35-999`
echo $1 - $dt - $touchDate
exiftool -AllDates="$dt" -IFD0:DateTimeOriginal="$td" -sep ", " -keywords="$keywords" -keywords "Hipstamatic" "$1"
touch -t "$touchDate" "$1"
shift
done


(You can copy the code and paste it into a file called i.e. convertDates.sh. Then run it and pass it all the downloaded jpgs from Flickr: convertDates.sh *.jpg)

Then I use the following shell script to flip the Longitude from West to East:


#!/bin/bash

while [ -n "$1" ] ; do
long=`exiftool -GPSLongitudeRef "$1" | cut -b 35-53`
echo File: $1 "<$long>"

if [ "$long" == "West" ] ; then
exiftool -GPSLongitudeRef=East "$1"
fi

if [ "$long" == "East" ] ; then
exiftool -GPSLongitudeRef=West "$1"
fi
exiftool -GPSLongitudeRef "$1"
shift
done


(Again, copy code to file, make it executable and pass all your JPGs as command line parameters as above)

When I import these pictures into Aperture, the date is set correctly, Lens, Flash and Film information is in the keywords and the images are located correctly on the map.

Easy, ain't it?