Seamus is a project mainly written in Ruby, based on the MIT license.
Seamus is not an Irish monk
= Seamus
Seamus is not an Irish monk. Instead, it inspects a file and returns whatever metadata it can determine.
== Usage
Seamus inspects your file and discovers useful attributes. It is at its best with rich digital media - video, audio and image files - but is suitable for use with any file type. Just provide a path to Seamus::Builder.new for an enhanced File object that knows about your file.
movie = Seamus::Builder.new("/path/to/my/movie.mov")
movie.width
movie.video_codec
Or if you prefer, include Seamus in a class and use the has_file :file_attribute class method for attachments.
class Upload include Seamus has_file :file end
u = Upload.new u.file = "/path/to/image.jpg" u.file.width
Seamus supports thumbnail creation for visual media types. The #thumbnail method returns an IO instance.
u.file.thumbnail
== Extending Seamus
Seamus dynamically generates classes for file types as it encounters them. Seamus::Builder will, for example, generate a Seamus::File::Mp4 class and instance when given a path to an MPEG-4 file with .mp4 extension, which subclasses Seamus::File::Video.
You can build custom behavior around a file type by defining a class Seamus::File::
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2010 Scott Burton. See LICENSE for details.