Sha256: 4b3dd7f5c989909ec656378f871835af3d60a3eaa861f1bee7c8083b04e366e8
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
#!/usr/bin/env ruby require 'optparse' require File.expand_path('../../lib/profound', __FILE__) options = { :theme => :light, :width => 1920, :height => 1200 } parser = OptionParser.new do |opts| opts.banner = 'Usage: profound [options] source "Caption or label" destination' opts.separator "" opts.separator "Specific options:" opts.on("--theme=THEME", "light,dark") do |theme| options[:theme] = theme.to_sym end opts.on("--filter=FILTER", "toycamera") do |filter| options[:filter] = filter.to_sym end opts.on("--search-size=WIDTHxHEIGHT") do |size| sizes = size.split("x") options[:width] = sizes[0] options[:height] = sizes[1] end opts.on("--font-family=FONT") do |font_family| options[:font_family] = font_family end end parser.parse! if (2..3) === ARGV.length source, caption, destination = (ARGV.length == 3 ? ARGV : [nil, *ARGV]) end unless caption && destination puts parser.to_s exit(1) end Profound::Image.new(source, caption, options, destination).convert
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
profound-0.0.6 | bin/profound |
profound-0.0.5 | bin/profound |
profound-0.0.4 | bin/profound |