#!/usr/bin/env ruby require 'optiflag' require File.join(File.dirname(__FILE__), '..', 'lib', 'inspector') module AutoTvNZB extend OptiFlagSet flag "p" do description "Directory path with many TV Shows directories" end flag "apikey" do description "Sabnzbd api key (from 0.4.9)" end character_flag :w # wait and_process! end begin inspector = Inspector.new(ARGV.flags.p, ARGV.flags.apikey, :wait => ARGV.flags.w?) rescue => e p e.to_s Inspector.growl("AutoTvNZB Error!", 'look into the console log', 'failure.png') end