bin/masticate in masticate-0.1.3 vs bin/masticate in masticate-0.1.4
- old
+ new
@@ -47,10 +47,18 @@
end
opts.on("--dejunk", "(for *mend* only) Expunge junk lines from source") do |v|
options[:dejunk] = v
end
+
+ opts.on("--by FIELD", "(for *maxrows* only) Field to group by") do |f|
+ options[:by] = f
+ end
+
+ opts.on("--max FIELD", "(for *maxrows* only) Field to find max value for") do |f|
+ options[:max] = f
+ end
end.parse!
filename = ARGV.shift # use stdin if no filename provided
def logmessage(command, options, results)
@@ -94,9 +102,13 @@
results = Masticate.datify(filename, options)
logmessage(command, options, results)
when 'gsub'
results = Masticate.gsub(filename, options)
+ logmessage(command, options, results)
+
+when 'maxrows'
+ results = Masticate.maxrows(filename, options)
logmessage(command, options, results)
else
raise "unknown command #{command}"
end