Sha256: 5a774b2bf50a9271e86a52aa1916d4da87b859ca826303fc0320de808b4c2edd
Contents?: true
Size: 412 Bytes
Versions: 10
Compression:
Stored size: 412 Bytes
Contents
#!/usr/bin/env ruby require 'json' headers = [] STDIN.each_line do |line| line.chomp! if line =~ /^#Version:/ next end if line =~ /^#Fields:/ fields = line.split(/^#Fields: /)[1..-1][0] headers = fields.split(/\s+/) next end values = line.split(/\t/) data = {} headers.each_with_index do |header, index| data[header] = values[index] end puts data.to_json end
Version data entries
10 entries across 10 versions & 1 rubygems