Sha256: effa624d7449f18f5295661233ed44046184bf7602e60b5b128183e60421a177

Contents?: true

Size: 609 Bytes

Versions: 1

Compression:

Stored size: 609 Bytes

Contents

#!/usr/bin/env ruby

require_relative '../lib/interactive_brokers_2_tasty_works'

if ARGV[0].nil? || ARGV[1].nil? || ARGV[0].include?('--help') || ARGV[0].include?('-?')
  puts "\nUsage: ./ib2tw /path/to/input.xml /path/to/output.csv\n\n"
  exit 1
end

input_file = File.expand_path(ARGV[0])
output_file = File.expand_path(ARGV[1])

unless File.exists?(input_file)
  puts "\nFile not found: #{input_file}\n\n"
  exit 1
end

puts "\n"
puts "Input: #{input_file}"
puts "Output: #{output_file}\n"
puts "Converting..."

InteractiveBrokers2TastyWorks.new(input_path: input_file).save_as(output_file)

puts "Done!"

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
interactive_brokers_2_tasty_works-0.2.0 bin/ib2tw