Sha256: 7cbd8bbda1773e80b4583a2d8163aaf58ecc3bc7a79b1d428e0efdaf814cb761

Contents?: true

Size: 1.63 KB

Versions: 4

Compression:

Stored size: 1.63 KB

Contents

#!/usr/bin/env ruby

$:.push File.expand_path("../../lib", __FILE__)

require 'frameit'
require 'commander/import'
require 'frameit/update_checker'
require 'frameit/dependency_checker'

HighLine.track_eof = false


# Commander
program :version, Frameit::VERSION
program :description, 'Find all screenshots in current folder and put a nice frame around it. This will duplicate the images.'
program :help, 'Author', 'Felix Krause <krausefx@gmail.com>'
program :help, 'Website', 'http://felixkrause.at'
program :help, 'GitHub', 'https://github.com/krausefx/frameit'
program :help_formatter, :compact

global_option('--verbose') { $verbose = true }


Frameit::UpdateChecker.verify_latest_version

default_command :black


command :black do |c|
  c.syntax = 'frameit black'
  c.description = "Adds a black frame around all screenshots."

  c.action do |args, options|
    Frameit::DependencyChecker.check_dependencies
    Frameit::Editor.new.run('.', Frameit::Editor::Color::BLACK)
  end
end

command :silver do |c|
  c.syntax = 'frameit silver'
  c.description = "Adds a silver frame around all screenshots."
  
  c.action do |args, options|
    Frameit::DependencyChecker.check_dependencies
    Frameit::Editor.new.run('.', Frameit::Editor::Color::SILVER)
  end
end

command :setup do |c|
  c.syntax = 'frameit setup'
  c.description = "Helps you adding new frames."
  
  c.action do |args, options|
    Frameit::DependencyChecker.check_dependencies
    Frameit::FrameConverter.new.run
  end
end

alias_command :white, :silver

def shared_run(c)
  c.description = 'Find all screenshots in current folder and put a nice frame around it. This will duplicate the images.'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
frameit-0.1.5 bin/frameit
frameit-0.1.4 bin/frameit
frameit-0.1.3 bin/frameit
frameit-0.1.2 bin/frameit