# Copyright (C) 2003-2005 Kouichirou Eto, All rights reserved.

$LOAD_PATH << "../../lib" unless $LOAD_PATH.include?("../../lib")
require "qwik/config"
require "qwik/password"

module Qwik
  class ShowPassword
    def self.main(argv)
      if argv.length == 0
	puts "usage: showpassword [mailaddress]"
	exit
      end

      config = Config.new
      gen = PasswordGenerator.new(config)
      mail = argv.shift
      puts "mail: "+mail
      puts "pass: "+gen.generate(mail)
    end
  end
end
