exifr - Ruby EXIF reading library

B

Benjohn Barnes

I've just made use of the EXIFR library. The docs are here:

http://exifr.rubyforge.org/api/index.html

It's splendid, and highly recommended as absolutely as simple as can be,
but completely effective. Thank you very much "R.W. van ‘t Veer". I
particularly like that it's (I assume?) pure ruby. It certainly didn't
seem to do anything unusual during:

sudo gem install exifr

Why do I need this? I've just got 550 photos back from an online
printing outfit, but to my dismay, they have stopped labelling the back
of prints with photo's capture time (from EXIF meta-data). All they have
now is the completely arbitrary filename.

No matter! EXIFR to the rescue! A quick script in irb along the lines of:

f = Dir.glob('*.jpg')
table = f.map {|file_name| [file_name,
EXIFR::JPEG.new(file_name).exif.date_time_original]}
table.each {|name, date| puts "#{name} #{date}"}; nil

And I've got a nice ASCII table from which I can quite quickly label the
photos by hand. Hopefully by a nice warm fire with a cup of cocoa.


All the best,
Benjohn
 
O

Ollivier Robert

I've just made use of the EXIFR library. The docs are here:

http://exifr.rubyforge.org/api/index.html

It's splendid, and highly recommended as absolutely as simple as can be,
but completely effective. Thank you very much "R.W. van ‘t Veer". I

What about using mini_exiftool? Apart from the fact that it is just a wrapper
around the splendid exiftool (unfortunately in Perl), it is read/write and
support far more file formats (especially RAW ones)...
 
B

benjohn

What about using mini_exiftool? Apart from the fact that it is just a
wrapper
around the splendid exiftool (unfortunately in Perl), it is read/write and
support far more file formats (especially RAW ones)...

Well, I didn't need any of that :) I'm sure the tool you mention is also
marvelous though.

The fact that EXIFR is (I think) pure Ruby means that it will work
anywhere where Ruby will work. It's just some Ruby code. It doesn't need
libraries installed, or native code compiled (for the right distribution
of Ruby that you have installed), or anything else that might become a
hurdle to trying to get something amazingly simple done.

:) In case it's of any interest... Of late I've realised that the
frustrations I have as a software engineer are all about what I think Fred
Brooks called Accidental Complexity in The Mythical Man Month.

Take wanting to write a simple game using simple graphics. This just
should not be hard. The Gosu library manages to make it easy. Hooray!
[Although it could still be easier to get simple graphics on the screen].
You install the binary package, and it works.

Other combinations of language and library that I've tried have always
involved installing some packages, probably compiling something, and
during this process, something allways seems to go wrong. This isn't stuff
that I'm especially good at sorting out, or want to sort out.

I think that in our industry, almost all of what people do day to day is
because of accidental complexity. Very little of it is really about the
underlying problem being hard.

Cheers,
Benjohn
 

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top