#!/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('-s', '--silent', "Be less verbose") do options[:verbose] = false 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, options) config.invoke(task)