Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 23 lines (18 sloc) 0.482 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# -- encoding: utf-8 --
require 'open-uri'
require 'rubygems'
require 'mini_exiftool'

unless ARGV.size == 1
  puts "usage: ruby #{__FILE__} URI"
  puts " i.e.: ruby #{__FILE__} http://www.23hq.com/janfri/photo/1535332/large"
  exit -1
end

# Fetch an external photo
filename = open(ARGV.first).path

# Read the metadata
photo = MiniExiftool.new filename

# Print the metadata
photo.tags.sort.each do |tag|
# puts "#{tag}: #{photo[tag]}"
  puts tag.ljust(28) + photo[tag].to_s
end
Something went wrong with that request. Please try again.