Top Level Namespace

Defined Under Namespace

Modules: AXML, CLI, FinalCutPro, ITunes, MediaProcessingTool, TimecodeMethods, UDAMUtils Classes: MediaInformationGatherer

Instance Method Summary collapse

Instance Method Details

#add_common_optionsObject



77
78
79
80
81
82
83
84
# File 'lib/cli.rb', line 77

def add_common_options
  options[:log_level] ||= 1
  common_option_parser.on('--[no-]options-file [FILENAME]', "\tdefault: #{options[:options_file_path]}" ) { |v| options[:options_file_path] = v }
  common_option_parser.on('--log-to FILENAME', 'Log file location.', "\tdefault: STDERR") { |v| options[:log_to] = v }
  common_option_parser.on('--log-level LEVEL', CLI::LOGGING_LEVELS.keys, "Logging level. Available Options: #{CLI::LOGGING_LEVELS.keys.join(', ')}",
                          "\tdefault: #{CLI::LOGGING_LEVELS.invert[options[:log_level]]}") { |v| options[:log_level] = CLI::LOGGING_LEVELS[v] }
  common_option_parser.on('-h', '--help', 'Show this message.') { puts common_option_parser; exit }
end

#common_option_parserObject



71
72
73
74
75
76
# File 'lib/cli.rb', line 71

def common_option_parser
  @common_option_parser ||= begin
    CLI.options ||= options
    CLI.new_common_option_parser
  end
end

#optionsObject



70
# File 'lib/cli.rb', line 70

def options; @options end