#!/usr/bin/env ruby require 'shaddox' require 'optparse' @doxfile = './Doxfile' options = { :verbose => true } OptionParser.new do |opts| opts.banner = "Usage: shaddox [task] [options]" opts.on('-v', '--verboase', "Run verbosely") do options[:verbose] = true end opts.on('--doxfile', "Specify doxfile") do |f| @doxfile = f end opts.on_tail("-h", "--help", "Show help text") do puts opts exit end end.parse! task = ARGV[0] || :default config = Shaddox::Config.new(@doxfile) config.invoke(task, options)