Sha256: 403b925262ede3009ba4f66f7c2c98a0ae83722f7c9d023d0b42cfbfbfcb6783

Contents?: true

Size: 406 Bytes

Versions: 26

Compression:

Stored size: 406 Bytes

Contents

#!/usr/bin/env ruby


counter = 0
STDIN.each_line do |line|
  counter += 1
  key, value = line.split(' : ')
  prefix = key.scan(/(^\s+)(.*)/)[0][0]
  key.gsub!(/^\s+/, '')
  value.gsub!(/^\s+/, '')
  value.gsub!(/,$/, '')
  puts prefix + "#{('dir_' + counter.to_s).inspect} : {"
  puts prefix + '  "source" : ' + "#{key.chomp},"
  puts prefix + '  "target" : ' + "#{value.chomp}"
  puts prefix + '},'
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
ix-cli-0.0.27 bin/ix-parse
ix-cli-0.0.26 bin/ix-parse
ix-cli-0.0.25 bin/ix-parse
ix-cli-0.0.24 bin/ix-parse
ix-cli-0.0.23 bin/ix-parse
ix-cli-0.0.22 bin/ix-parse
ix-cli-0.0.21 bin/ix-parse
ix-cli-0.0.20 bin/ix-parse
ix-cli-0.0.19 bin/ix-parse
ix-cli-0.0.18 bin/ix-parse
ix-cli-0.0.17 bin/ix-parse
ix-cli-0.0.16 bin/ix-parse
ix-cli-0.0.15 bin/ix-parse
ix-cli-0.0.14 bin/ix-parse
ix-cli-0.0.13 bin/ix-parse
ix-cli-0.0.12 bin/ix-parse
ix-cli-0.0.11 bin/ix-parse
ix-cli-0.0.10 bin/ix-parse
ix-cli-0.0.9 bin/ix-parse
ix-cli-0.0.7 bin/ix-parse