added --bins option
parent
89bb9cf027
commit
e12c6af35e
|
@ -85,11 +85,13 @@ OptionParser.new do |opts|
|
|||
opts.on("-t", "--type type", "Type of file. Must be \"iat\" or \"pn\"") do |type|
|
||||
options[:type] = type
|
||||
end
|
||||
opts.on("-b", "--bin-file binfile", "Name of the bin file") do |binfile|
|
||||
options[:binfile] = binfile
|
||||
end
|
||||
end.parse!
|
||||
|
||||
|
||||
|
||||
csv = CSV.read('./bins.csv')
|
||||
csv = CSV.read(options[:binfile])
|
||||
text = File.read(options[:file])
|
||||
text = strip_text(text, 'PLOVEINTAKE', 'PLOVECLOSING') if options[:type] == 'iat'
|
||||
text = split_text(text, 'Narrative:', 'Signatures:') if options[:type] == 'pn'
|
||||
|
@ -108,4 +110,3 @@ bins.each_key do |bin_number|
|
|||
end
|
||||
write_output(output,outfile)
|
||||
|
||||
puts text
|
||||
|
|
Loading…
Reference in New Issue