Sha256: 604a219d6c3acaecd2d280c1c740344114fc039e463eb42963c5043c7cccd9aa

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

require 'thor'

module Yearbook
  class CLI < Thor
    desc 'hello', 'from'
    def hello(from)
      puts "Hello world, from: #{from}"
    end

    desc 'face', 
    %q{ Provide the path to an image with a face in it:
        yearbook face /path/to/photo.jpg /path/out/face-in-photo.jpg
    }
    def face(path, outpath=nil)
      fpath = File.expand_path(path)
      @image = Image.new(fpath)

      outpath ||= path.sub(/(?=\.\w*$)/, '-face')
      # eh overwrite it anyway
      @image.clip_and_print_best_face(outpath)
    end
  end


end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
yearbook-0.3.0 lib/yearbook/cli.rb