-# The conditions that games and players are rated as following:
-# * Rated games, which were played by both rated players.
-# * Rated players, who logged in the server with a name followed by a trip:
-# "name,trip".
-# * (Rated) players, who played more than $GAMES_LIMIT [15] (rated) games.
+# Author:: Daigo Moriwaki
+# Homepage:: http://sourceforge.jp/projects/shogi-server/
+#
+#--
+# Copyright (C) 2006-2009 Daigo Moriwaki <daigo at debian dot org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#++
+#
+# == Synopsis
+#
+# mk_rate reads game results files generated by the mk_game_results command,
+# calculates rating scores of each player, and then outputs a yaml file
+# (players.yaml) that Shogi-server can recognize.
+#
+# == Usage
+#
+# ./mk_rate [options] GAME_RESULTS_FILE [...]
+#
+# ./mk_rate [options]
+#
+# GAME_RESULTS_FILE::
+# a path to a file listing results of games, which is genrated by the
+# mk_game_results command.
+# In the second style above, the file content can be read from the stdin.
+#
+# --base-date::
+# a base time point for this calicuration (default now). Ex. '2009-10-31'
+#
+# --half-life::
+# n [days] (default 60)
+#
+# --half-life-ignore::
+# m [days] (default 7)
+# after m days, the half-life effect works
+#
+# --fixed-rate-player::
+# player whose rate is fixed at the rate
+#
+# --fixed-rate::
+# rate
+#
+# --skip-draw-games::
+# skip draw games. [default: draw games are counted in as 0.5 win and 0.5
+# lost.]
+#
+# --help::
+# show this message
+#
+# == PREREQUIRE