Commit 0fec9616 authored by Dave Machado's avatar Dave Machado
Browse files

Skip schema lines and split lines by pipe-char

parent 6e1da9a1
#!/usr/bin/env ruby #!/usr/bin/env ruby
args = ARGV args = ARGV
filename = args[0] filename = args[0]
File.foreach(filename).with_index do |line, line_num| File.foreach(filename).with_index do |line, line_num|
line_num += 1 line_num += 1
puts "#{line_num}: #{line}" # puts "#{line_num}: #{line}"
if line.start_with?('|')
# Skip table schema lines
if line.eql? "|---|---|---|---|---|\n"
next
end
values = line.split("|")
values.each.with_index do |v, vn|
puts "#{vn}: #{v}"
end
end
end end
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment