a light that never goes out

Main menu

Monthly Archives: November 2008

We recently went to an open house
at Heath Ceramics. A high
end ceramics manufacturer in Sausalito and definitely an interesting
visit. As a hobbiest potter, I was a little torn as to what to think
about their setup. The ‘handcrafted’ portion of what they do is very
minimal compared to what a traditional defined potter does. They use
forms, slip-casting, and jiggers to make pretty much everything. The
human element seems most prevelent in cleaning up the pieces before
firing, and glazing them. I certainly understand why they do things
the way they do, it is a fine line to walk to be able to make enough
pieces to actually be a large business that can do global orders and
still have some of the desirable characteristics of traditional
pottery. Throwing by hand takes forever in comparision an automated
factory lacks character. For example they can form a large bowl in 30
seconds with their not quite totally mechanized process. Cleaning it
up, getting it glazed with a airbrush, and fired doesn’t take much
longer it terms of human time that goes in the bowl. The bowls will
be almost exactly the same but just slightly different enough from
each other that they have much more character than something that
really is produced in a modern automated factory somewhere that turns
up in a big box store for 30 bucks. My qualms with the
“marketing message” vs what I percieve as “the reality of the
situation” aside, they have a great facility. Huge kilns with drop
down walls made of spun glass are super efficent and I’m massively
envious of them, big dry rooms, awesome glazing stations, and a
wonderful clay mixing/recyling room. The tour was great because
during the openhouse they actually have people at the various stations
showing how all the tools work (typically the tours wouldn’t have any
demonstrations) and the workers are quite capable of knocking out
piece after piece – though we were on the last tour and I suspect the
workers all wanted to go home and get some use out of their
weekend. Their tiles were really nice and I know from making tiles
myself what a pain it can be to do those right. The designs are all
nice, mostly post modern, that for the most part have been around for
40+ years. The founder was a potter and is exhibited in various
design museums, and I suspect her name and the assicated prestige of
Heath ceramics really helps them in the business and global
marketplace as being a status symbol since while they can knock out
maybe more pieces than a tradition potter they are still very limited
in production compared to a huge factory in China. I think that if
one were able to afford it the pieces are great and much better than
your big box store stuff. They do have seconds and overruns on tile
availble at a discount, and the openhouses each year they sell everying
at 20% off which is even better. If I ever end up with a house that
needs some tile I would definitely check them out.

For a number of years back in the day I used the gallery.menalto.com software to host an online gallery of photos. Back in this rough and tumble wild
west days of metadata there weren’t great standards that could handle all possible metadata cases – and so the metadata was all stored in serialized php objects.

Fast forward to today, where there are great ways to store metadata for a photo right there with the photo. You can have exif, xmp, an iptc (to name some popular choices) and all the photo applications are aware enough to use that data. I only had limited meta data in the gallery software (title, caption, comments) but I had thousands of photos and the idea of entering that stuff in by hand was not appealing, neither was throwing it away. Thus I wrote some code to deal with it. It isn’t pretty and isn’t super fast but it does work.

The unserialize.php script is fairly straight forward, you feed it a photos.dat file and it spits out a line for each photo with filename, title, caption, comments and if the file was hidden or not.

# Back before gallery had both title and caption I hacked in title, then when
# gallery added ‘extraFields’ I migrated the titles into an extraField called title
# so I go and check if that title exists in extra fields then pick which title I
# should be using
$extraFields = $obj->extraFields;
#var_dump($extraFields);
$extraTitle = $extraFields[‘Title’];
#var_dump($extraTitle);
$theTitle = $extraTitle;
if ($title != null) {
$theTitle = $title;
if (strlen($extraTitle) > 0 and strlen($title) > 0 and $extraTitle != $title) {
echo “Mismatched titles: $extraTitle $title”;
}
}

The next step is to run this on all the photos.dat files I have, and take that meta data and insert it into the actual files.
For this I wrote a little perl script. The perl script works on some assumptions, mostly on file and directory names.
1) It assumes: The photos.dat files are in a directory named with the date in YYYY_MM_DD format (for example 2003_07_04 4thofJuly)
2) It assumes: That the actual image files are also in a directory that contains the YYYY MM and DD (in any order).
3) It assumes: That the file names of the actual images match the names in the photos.dat serialized object.

To acomplish I had to write some scripts, first many of my albums were named DD_MM_YYYY name, which wasn’t super helpful so I wrote a script get them all in the same date format, and munges the file names in the same way gallery does. (You will probaly have to fiddle with the script to make it work for your own situation.) This takes care of assumption 1 and 3.

Assumption 2 seemed like a given for me since I have always included year month date in my folder names, and ignoring order it seems like I would be fine,
however I found a few cases where I had put the wrong date in the gallery album and correct date in the folder on my computer. So I had to write a little
script to check that all the folders with photos.dat files actually had matching folders of images with the same date. Thus I wrote another script, this one assumes that you have run updatedb recently so the locate command will work. Basically I parse out the date of a photos.dat file path, then grab the first
image and locate the image which gives me all the paths, I then parse those paths looking for one that matches the data and the folder location of my images sans metadata.

# my photos .dat files are in ../eric/albums/ and the folder of images with no
# meta data are in ../eric/Pictures/YYYY/etc Aperture managed to pick up some
# of the album folders from long in the distant past though an iphoto import and
# iphoto had sucked them down while scanning the drive, oye! So do these
# various checks on the path to make sure the path really is a path with
# the correct date in correct location
foreach my $fileLoc (@files) {
if ($fileLoc !~ /Users\/eric\/Pictures/) {next;}
if ($fileLoc =~ /Aperture/) {next;}
if ($fileLoc !~ /$year/) {next; }
if ($fileLoc !~ /$month/) {next; }
if ($fileLoc !~ /$day/) { next; }
$found = 1;
last;
}

if ($found == 1) {
last;
}
}

if ($found == 0) {
print “No matches: $photoDat\n”;
}
}

This finds both photo.dat files that have a directory name that is a little off from the image file directory and it also finds instances where I had only loaded the images into gallery and hadn’t managed to keep a copy in my Pictures folder. For the later case I just make the approriate directory and copied the image files from gallery.

Finally I have the script that reads all the photos.dat files, unserializes them, finds all instances of those files, and updates the metadata.

So there ya go. Hopefull that is useful to someone else at somepoint down the line.
I suppose one final point is if you had made descriptions for you albums you would need to write something like unserialize.php but that takes the album.dat file instead and strips out the description. The challenge there is where do you put that description? I’m thinking of just putting it in text file in the fold it is associated with, but that is a task for another time.