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

Version Path
ix-cli-0.0.27 bin/ix-cloudfront-to-json
ix-cli-0.0.26 bin/ix-cloudfront-to-json
ix-cli-0.0.25 bin/ix-cloudfront-to-json
ix-cli-0.0.24 bin/ix-cloudfront-to-json
ix-cli-0.0.23 bin/ix-cloudfront-to-json
ix-cli-0.0.22 bin/ix-cloudfront-to-json
ix-cli-0.0.21 bin/ix-cloudfront-to-json
ix-cli-0.0.20 bin/ix-cloudfront-to-json
ix-cli-0.0.19 bin/ix-cloudfront-to-json
ix-cli-0.0.18 bin/ix-cloudfront-to-json