Sha256: 8a07a4f2d1b471b8073749c54ac8d1fcf346576a78a858b0336d67d076962351
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
#!/usr/bin/env ruby $LOAD_PATH.unshift("#{File.dirname(__FILE__)}/../lib") require 'xibtoti' require 'optparse' OptionParser.new do |opts| opts.banner = "Usage: xibtoti [options] filename" opts.on("-w", "--[no-]warnings", "Show warnings") do |w| @show_warnings = w end opts.on("-o", "--output-file name", "Specify output file") do |o| @output_file = o end opts.on("-c", "--config-file name", "Specify config file") do |o| @config_file = o end end.parse! if ARGV.size == 1 input_file = ARGV.first session = Session.new @config_file || File.join("#{File.dirname(__FILE__)}/../lib", 'config.rb') session.parse_file input_file if session.has_errors? puts "Aborted!" puts session.full_log [:error] else severities = [] severities.unshift :warning if @show_warnings log = session.full_log severities script = js_comments_for(log) + js_for(session.out) if @output_file File.open(@output_file, 'w') do |file| file.write script end puts log else puts script end end else puts "For help, type: xibtoti -h" end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
xibtoti-0.0.2 | bin/xibtoti |