require 'thor'

module Gif2lgtm
  class Cli < Thor
    desc 'start ./bar.gif', 'Pass the file path.'
    def start(image)
      ext = File.extname(image).delete('.').upcase

      if Magick.formats.keys.include?(ext)
        Gif2lgtm::Main.start(image)
      else
        puts 'This extension is not allowed.'
      end
    end
  end
end