exe/aip2aixm in aipp-0.1.2 vs exe/aip2aixm in aipp-0.1.3
- old
+ new
@@ -18,11 +18,11 @@
@airac = AIPP::AIRAC.new(Date.today).date
@limit = Float::INFINITY
@verbose = false
OptionParser.new do |o|
o.banner = <<~END
- Download online AIP and convert it to AIXM.
+ Download online AIP and convert it to AIXM for VFR.
Usage: #{File.basename($0)} [options]
END
o.on('-A', '--about', 'author and license information') { puts 'Written by Sven Schwyn (bitcetera.com) and distributed under MIT license.'; exit }
o.on('-l', '--list', "list available FIR/AIP and exit") { puts AIPP::Loader.list.to_yaml; exit }
o.on('-f', '--fir STRING', String, 'FIR (flight information region, e.g. "LF")') { |v| @fir = v }
@@ -40,11 +40,11 @@
def run
extensions = [(:ofm if ofm)].compact
filename = [fir, aip, airac].join('_') + '.aixm'
loader = AIPP::Loader.new(fir: fir, aip: aip, airac: airac, limit: limit)
- aixm = loader.aixm.to_aixm(*extensions)
- File.write(Pathname.new(Dir.pwd).join(filename), aixm)
+ File.write(Pathname.new(Dir.pwd).join(filename), loader.aixm.to_aixm(*extensions))
+ puts "#{loader.aixm.features.count} feature(s) written to #{filename}"
end
end
begin
executable = Executable.new