#!/usr/bin/env ruby require 'optparse' require 'fontlike' options = {} OptionParser.new do |opts| opts.banner = "Usage: circle [options]" opts.on("-f", "--fancy", "Get fancy") do |f| options[:style] = :fancy end opts.on("-a", "--angry", "Get angry") do |s| options[:style] = :shout end opts.on("-m", "--mono", "Get oldschool") do |m| options[:style] = :mono end opts.on("-c", "--circle", "Get circled?") do |c| options[:style] = :circle end opts.on("-s", "--sans-serif", "Get attractive") do |ss| options[:style] = :sans_serif end opts.on("-ds", "--double-struck", "Get struck") do |ds| options[:style] = :double_struck end opts.on("-r", "--random", "Get random") do |r| options[:style] = :random end end.parse! transmuter = Fontlike::Transmuter.new(options) copy = transmuter.transmute(ARGV.join(" ")) puts "--> Copied \"#{copy}\" to clipboard" %x(echo #{copy} | pbcopy)