bin/tracksperanto in tracksperanto-2.2.4 vs bin/tracksperanto in tracksperanto-2.3.0
- old
+ new
@@ -15,10 +15,11 @@
require 'rubygems'
require 'progressbar'
require "net/http"
require "open-uri"
require "timeout"
+require File.dirname(__FILE__) + '/../lib/tracksperanto/pbar'
def version_check(version_present)
begin
version_info = open("http://rubygems.org/api/v1/gems/tracksperanto.xml").string.scan(/<version>(.+)<\/version>/).to_s
int_available, int_present = [version_info, version_present].map{|v| v.scan(/(\d+)/).to_s.to_i }
@@ -102,14 +103,13 @@
unless File.exist?(input_file)
$stderr.puts "Input file #{input_file} does not exist"
exit(-1)
end
-pbar = ProgressBar.new("Converting", 100, $stderr)
-pipe = Tracksperanto::Pipeline::Base.new(:progress_block => lambda{|p,m| pbar.set(p) }, :middleware_tuples => $middlewares)
+pbar = Tracksperanto::PBar.new("Converting", 100, $stderr)
+pipe = Tracksperanto::Pipeline::Base.new(:progress_block => lambda{|p,m| pbar.set_with_message(p, m) }, :middleware_tuples => $middlewares)
pipe.exporters = [Tracksperanto.get_exporter(writer_klass_name)] if writer_klass_name
pipe.run(input_file, options)
pbar.finish
-puts "Converted #{pipe.converted_points} trackers with #{pipe.converted_keyframes} keys."
puts disclaimer
version_check(Tracksperanto::VERSION)
\ No newline at end of file