bin/tracksperanto in tracksperanto-2.6.1 vs bin/tracksperanto in tracksperanto-2.6.2
- old
+ new
@@ -92,10 +92,11 @@
puts "Copyright 2008-#{Time.now.year} by Guerilla-DI (Julik Tarkhanov and contributors)"
puts disclaimer
UpdateHints.version_check("tracksperanto", Tracksperanto::VERSION, STDOUT)
exit(0)
end
+op.on("--trace", "Output LOTS of info during conversion") { $debug = true }
begin
op.parse!
rescue CodeLoaded
$code = true
@@ -112,10 +113,17 @@
$stderr.puts "Input file #{input_file} does not exist"
exit(1)
end
pbar = ProgressBar.new("Converting", 100, $stdout)
-progress = lambda{|percent,message| pbar.set(percent) }
+progress = lambda do |percent,message|
+ pbar.set(percent)
+ if $debug
+ STDOUT.puts("[%d -> %s]" % [percent, message])
+ STDOUT.flush
+ end
+end
+
begin
pipe = Tracksperanto::Pipeline::Base.new(:progress_block => progress, :middleware_tuples => $middlewares)
pipe.exporters = [Tracksperanto.get_exporter(writer_class_name)] if writer_class_name
pipe.run(input_file, options)
rescue Tracksperanto::UnknownExporterError => damn
\ No newline at end of file