#
# == Synopsis
#
-# mk_rate reads CSA files, calculates rating scores of each player, and then
-# outputs a yaml file (players.yaml) that Shogi-server can recognize.
+# 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] DIR..
+# ./mk_rate [options] GAME_RESULTS_FILE [...]
+#
+# ./mk_rate [options]
#
-# DIR::
-# CSA files are recursively looked up the directories.
+# 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'
#
# $ sudo gem install rgl
#
-# == Run
+# == Examples
+#
+# $ ./mk_rate game_results.txt > players.yaml
#
-# $ ./mk_rate . > players.yaml
+# $ ./mk_game_results . | ./mk_rate > players.yaml
#
-# or, if you do not want the file to be update in case of errors,
+# If you do not want the file to be update in case of errors,
#
-# $ ./mk_rate . && ./mk_rate . > players.yaml
+# $ ./mk_rate game_results.txt && ./mk_rate game_results.txt > players.yaml
#
# == How players are rated
#
def usage(io)
io.puts <<EOF
-USAGE: #{$0} [options] DIR..
- DIR where CSA files are looked up recursively
+USAGE: #{$0} [options] GAME_RESULTS_FILE [...]
+ #{$0} [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.
+
OPTOINS:
--base-date a base time point for this calicuration (default now). Ex. '2009-10-31'
--half-life n [days] (default 60)