Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ruby gem for ranking images on an HTML page for use as a thumbnail to represent the page

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 COPYING
Octocat-spinner-32 Gemfile
Octocat-spinner-32 README.markdown
Octocat-spinner-32 plumnailer.gemspec
Octocat-spinner-32 test.rb

Compare all of the images on an HTML page and sort them according to how well they represent what the page is about. The top image could be used as a thumbnail to represent the entire page.

Basic usage:

require 'plumnailer'

chooser =
choice = chooser.choose('')
puts choice.source_url

choice.resize_to_fill(64, 64).write('thumb.jpg')

Alternate fetcher that caches images on local filesystem:

require 'plumnailer'

chooser =
chooser.fetcher = chooser.img_parser.fetcher ='/tmp/plumnailer-test')

choice = chooser.choose('')
puts choice.source_url

Top five images:

require 'plumnailer'

chooser =
chooser.choose('', :top => 5).each do |i|
  puts i.source_url

Questions and comments:

Something went wrong with that request. Please try again.