2011-03-18 16:28:53 +00:00
|
|
|
require 'thor'
|
|
|
|
require 'avm/image'
|
|
|
|
require 'pp'
|
|
|
|
|
|
|
|
module AVM
|
2011-03-23 18:10:02 +00:00
|
|
|
# The CLI interface
|
2011-03-18 16:28:53 +00:00
|
|
|
class CLI < ::Thor
|
|
|
|
default_task :convert
|
|
|
|
|
|
|
|
desc 'convert', "Convert a file from one format to another"
|
|
|
|
def convert
|
|
|
|
data = $stdin.read
|
|
|
|
|
|
|
|
pp AVM::Image.from_xml(data).to_h
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|