exe/photoapp in desoto-photoapp-0.1.3 vs exe/photoapp in desoto-photoapp-0.1.4

- old
+ new

@@ -1,39 +1,34 @@ #! /usr/bin/env ruby $LOAD_PATH.unshift(File.expand_path("../lib", File.dirname(__FILE__))) require 'optparse' -require "desoto-photoapp" +require 'desoto-photoapp' options = {} OptionParser.new do |opts| opts.on("-c", "--config PATH", String, "Path to config file") do |config| options['config'] = config end - - opts.on("-s", "--source PATH", String, "Path to photos directory") do |source| - options['source'] = source - end end.parse! if ARGV.first == 'setup' ARGV.shift if `brew list imagemagick` =~ /Error:/ system "brew install imagemagick" end system "open #{Photoapp.gem_dir('assets/photos-action-installer.pkg')}" else - p = Photoapp::Session.new(options) if ARGV.first == 'process' ARGV.shift - p.process + options['source'] = ARGV.shift + Photoapp::Session.new(options).process elsif ARGV.first == 'upload' + Photoapp::Session.new(options).upload + elsif ARGV.first == 'reprint' ARGV.shift - p.upload - elsif ARGV.first == 'print' - ARGV.shift - p.print + Photoapp.print(ARGV.shift) end end