Sha256: 87d9e38e889efa37cd66b4627ca02854d651bc31415179fd7d109558a4ea4ed3
Contents?: true
Size: 801 Bytes
Versions: 4
Compression:
Stored size: 801 Bytes
Contents
#!/usr/bin/env ruby require "rubygems" require File.dirname(__FILE__) + "/../lib/csvget" require "rwget" parser = RWGetOptionParser.new do |opts| opts.on("--parselet=JSON_FILE", "JSON_FILE is a parselet.") do |path| parser.options[:parselets] ||= [] parser.options[:parselets] << path end opts.on("--filter=RUBY_CODE", "RUBY_CODE will be eval'd in context of @row.is_a?(FasterCSV::Row)") do |filter| parser.options[:filter] ||= [] parser.options[:filter] << filter end end parser.parse! if parser.options[:seeds].empty? puts parser.usage puts " -h for options listing" exit(1) end parser.options[:store_class] ||= "CSVStore" controller = RWGet::Controller.new(parser.options) begin controller.start ensure STDERR.puts "Closing..." controller.close end
Version data entries
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
fizx-csvget-0.3.0 | bin/csvget |
fizx-csvget-0.3.1 | bin/csvget |
fizx-csvget-0.3.2 | bin/csvget |
csvget-0.4.0 | bin/csvget |