<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>db/migrate/005_add_photo_metadata.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -10,18 +10,16 @@ h3. There are many existing photo gallery apps around, but none I could find dem
   * Lightboxing effects using &quot;Leandro Vieira Pinho's jQuery lightBox&quot;:http://leandrovieira.com/projects/jquery/lightbox/
   * Photo Gallery courtesy of &quot;Galleria&quot;:http://devkick.com/lab/galleria/
   * Textboxing effects using &quot;Cody Lindley's ThickBox&quot;:http://jquery.com/demo/thickbox/
-  * Multiple file upload client &quot;SWFUpload&quot;:http://swfupload.org/
   * Thin controllers with &quot;James Golick's resource_controller&quot;:http://jamesgolick.com/resource_controller
   * File uploads and thumbnail generation with &quot;Thoughtbot's Paperclip&quot;:http://www.thoughtbot.com/projects/paperclip
-  * File storage with Amazon S3
   * User Registration with &quot;Rick Olson's restful_authentication&quot;:http://github.com/technoweenie/restful-authentication
-  * [THIS HAS BEEN REMOVED because of sqlite issues] Permalinks (SEO) using &quot;Randomba's friendly_id&quot;:http://github.com/norman/friendly_id/tree/master
   * Organized nested routes as described in &quot;Regulators!!! Mount up&quot;:http://giantrobots.thoughtbot.com/2008/7/10/regulators-mount-up
 
 h3. You will need the following additional gems installed:
 
   * sudo gem install mime-types http://mime-types.rubyforge.org/
   * sudo gem install right_aws (If you want to use Amazon S3 for storage, although paperclip + S3 is a bit slow)
+  * sudo gem install exif (used to store jpg metadata like when the photo was taken, aperture, f stop, etc.)
 
 h3. To install and run the app:
 
@@ -33,4 +31,7 @@ h3. To install and run the app:
   * rake db:migrate
   * rake db:bootstrap
   * script/server
-  
\ No newline at end of file
+  
+h4. SQLite and Ruby 1.9 support courtesy of &quot;ahaller&quot;:http://github.com/ahaller
+
+h4. Idea for photo EXIF extraction courtesy of &quot;nofxx&quot;:http://github.com/nofxx
\ No newline at end of file</diff>
      <filename>README.textile</filename>
    </modified>
    <modified>
      <diff>@@ -19,4 +19,26 @@ class Photo &lt; ActiveRecord::Base
   validates_attachment_presence :image
   validates_attachment_content_type :image, :content_type =&gt; ['image/jpeg', 'image/gif', 'image/png', 'image/pjpeg', 'image/x-png'] 
   
+  # This is the datetime format EXIF datetime is represented in 
+  @@exif_date_format = '%Y:%m:%d %H:%M:%S'
+  
+  # Define Paperclip callback just for the Photo attachment 
+  after_image_post_process  :post_process_image
+  
+  # Callback after styles processing (thumbnails). 
+  # Use this to extract Exif metadata from the image
+  def post_process_image
+    # only works with jpgs
+    if image.content_type == 'image/jpeg' || 'image/pjpeg'
+      img_meta = EXIFR::JPEG.new(image.queued_for_write[:original].path)
+      return unless img_meta
+      logger.debug &quot;Photo EXIF: &quot; + img_meta.inspect
+      self.camera_model = img_meta.model
+      self.exposure_time = img_meta.exposure_time.to_s
+      self.f_number = img_meta.f_number.to_s
+      self.taken_at = img_meta.date_time
+      # also have width and height. See http://exifr.rubyforge.org/api/index.html for details
+    end
+  end
+    
 end</diff>
      <filename>app/models/photo.rb</filename>
    </modified>
    <modified>
      <diff>@@ -52,7 +52,12 @@
   &lt;div id=&quot;main_image&quot;&gt;&lt;/div&gt;
   &lt;ul class=&quot;album&quot;&gt;
     &lt;% @object.public_photos.each_with_index do |photo, index| -%&gt;
-      &lt;li&lt;%= &quot; class='active'&quot; if index == 0 %&gt;&gt;&lt;%= link_to image_tag(photo.image.url(:thumb), :size =&gt; '50x50', :alt =&gt; h(photo.title)), photo.image.url, :title =&gt; photo.title %&gt;&lt;/li&gt;
+      &lt;% 
+      # add some exif data. Not really necessary, but here to show you how to display this info.
+      title = photo.title 
+      title = &quot;#{title} - Taken with #{photo.camera_model} on #{photo.taken_at.strftime('%b %d, %Y')}&quot; if photo.camera_model and photo.taken_at
+      -%&gt;
+      &lt;li&lt;%= &quot; class='active'&quot; if index == 0 %&gt;&gt;&lt;%= link_to image_tag(photo.image.url(:thumb), :size =&gt; '50x50', :alt =&gt; h(photo.title)), photo.image.url, :title =&gt; title %&gt;&lt;/li&gt;
     &lt;% end -%&gt;
   &lt;/ul&gt;
   &lt;p class=&quot;nav&quot;&gt;&lt;a href=&quot;#&quot; onclick=&quot;$.galleria.prev(); return false;&quot;&gt;&amp;laquo; previous&lt;/a&gt; | &lt;a href=&quot;#&quot; onclick=&quot;$.galleria.next(); return false;&quot;&gt;next &amp;raquo;&lt;/a&gt;&lt;/p&gt;</diff>
      <filename>app/views/albums/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -40,7 +40,8 @@ Rails::Initializer.run do |config|
   # config.gem 'mime-types'
   config.gem 'giraffesoft-resource_controller', :version =&gt; '~&gt; 0.6.1', :lib =&gt; 'resource_controller', :source =&gt; 'http://gems.github.com'
   config.gem 'mislav-will_paginate', :version =&gt; '~&gt; 2.3.2', :lib =&gt; 'will_paginate', :source =&gt; 'http://gems.github.com'
-  config.gem 'thoughtbot-paperclip', :version =&gt; &quot;~&gt; 2.2.7&quot;,:lib =&gt; 'paperclip', :source =&gt; 'http://gems.github.com'  
+  config.gem 'thoughtbot-paperclip', :version =&gt; &quot;~&gt; 2.2.7&quot;,:lib =&gt; 'paperclip', :source =&gt; 'http://gems.github.com'
+  config.gem 'exifr'  
 
   # Only load the plugins named here, in the order given. By default, all plugins 
   # in vendor/plugins are loaded in alphabetical order.</diff>
      <filename>config/environment.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>0fd02b4c1a5550a737df40032d4eb654e3d3300a</id>
    </parent>
  </parents>
  <author>
    <name>Dave Rapin</name>
    <email>dave@rapin.com</email>
  </author>
  <url>http://github.com/rapind/albumdy/commit/8e99afc6962e7e4cd30465d28e16daff645a7ef6</url>
  <id>8e99afc6962e7e4cd30465d28e16daff645a7ef6</id>
  <committed-date>2009-07-14T09:54:44-07:00</committed-date>
  <authored-date>2009-07-14T09:54:44-07:00</authored-date>
  <message>updated readme with credits and new gem. Added EXIF meta data extraction from photos. Need to run rake db:migrate</message>
  <tree>91ddfcd85be465a4a0738fb5093acfaf11c65680</tree>
  <committer>
    <name>Dave Rapin</name>
    <email>dave@rapin.com</email>
  </committer>
</commit>
