<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>No Content, No Fuss: Parsing EXIF/IPTC photo tags using pyexiv2 on Leopard</title>
    <link>http://anil.recoil.org/blog/articles/2008/04/17/parsing-exif-iptc-photo-tags-using-pyexiv2-on-leopard</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Anil Madhavapeddy</description>
    <item>
      <title>Parsing EXIF/IPTC photo tags using pyexiv2 on Leopard</title>
      <description>&lt;p&gt;I've been looking around at refreshing my current photo gallery to make it easier to update, since I'm around 1000 photos behind over the last year.  Part of making it easier to use is to adopt an &lt;a href="http://www.apple.com/aperture"&gt;Aperture&lt;/a&gt;-based system of marking the metadata directly in the image itself, and figuring out how to render so many pictures more effectively in my &lt;a href="http://anil.recoil.org/gallery/"&gt;gallery&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The best library I could find to do the job is &lt;a href="http://www.exiv2.org"&gt;Exiv2&lt;/a&gt; and its associated Python bindings &lt;a href="http://tilloy.net/dev/pyexiv2/"&gt;pyexiv2&lt;/a&gt;.  They use the rather complex &lt;a href="http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html"&gt;Boost.Python&lt;/a&gt; bindings, which are a total pain to compile on MacOS X Leopard.&lt;/p&gt;

&lt;p&gt;In order to get it to work:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the latest &lt;a href="http://www.finkproject.org"&gt;Fink&lt;/a&gt; to install:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;python25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;boost1.34.python25&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;libexiv2&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;scons&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Download the latest &lt;a href="http://tilloy.net/dev/pyexiv2/download.htm"&gt;pyexiv2 distribution&lt;/a&gt;, extract it, and drop in my &lt;a href="http://anil.recoil.org/files/pyexiv2/Makefile"&gt;exiv2 Leopard Makefile&lt;/a&gt; into the extracted directory.&lt;/li&gt;
&lt;li&gt;Type in:
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;make&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo make install&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;&lt;/li&gt;
&lt;li&gt;Test it out by running python2.5 and experimenting with importing pyexiv2 (see the pyexiv2 &lt;a href="http://tilloy.net/dev/pyexiv2/developers.htm"&gt;developer guide&lt;/a&gt; for more information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'll tidy this up into a fink package sometime, but for now I want to press on with finishing my &lt;a href="http://www.djangoproject.org/"&gt;Django&lt;/a&gt; experiments.&lt;/p&gt;</description>
      <pubDate>Thu, 17 Apr 2008 11:58:00 +0100</pubDate>
      <guid isPermaLink="false">urn:uuid:1c1c8218-945d-4f62-a566-953d1b685766</guid>
      <author>anil@recoil.org (Anil Madhavapeddy)</author>
      <link>http://anil.recoil.org/blog/articles/2008/04/17/parsing-exif-iptc-photo-tags-using-pyexiv2-on-leopard</link>
      <category>hacking</category>
      <category>macosx</category>
    </item>
  </channel>
</rss>
