# 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 IncrementGeneration
    def self.main(argv)
      if argv.length == 0
	puts "usage: incgen [mailaddress]"
	exit
      end

      config = Config.new
      gen = PasswordGenerator.new(config)
      mail = argv.shift
      g = gen.generation_inc(mail)
      puts "mail: "+mail
      puts "generation: "+g.to_s
      puts "increment generation done."
    end
  end
end
