Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 23 lines (16 sloc) 0.688 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
$LOAD_PATH.unshift File.expand_path(File.join(File.dirname(__FILE__), ".."))

require 'lib/ryfi'
require 'lib/eyefi'
require 'stringio'
require 'exifr'

# Register as many cards as you wish (accepts the card's MAC + upload key)
EyefiCard.register('782201658100', '2c3eadb135e2bd6cff25115ff51ee4c8')

class MyApp < RyfiApp
  
  handle_photos_with :handle_photo
  
  def handle_photo(card, photo)
    EyefiCard.log.debug "Received new photo (#{photo.original_name}) shot with an #{photo.exif[:model]}."
    photo.save_with_original_name! '/Users/kkeiter/Desktop/test'
  end
  
end

# Server must be run on 59278 so that the card can reach it.
MyApp.run! :host => 'localhost', :port => 59278
Something went wrong with that request. Please try again.