OSDN Git Service

- mk_rate: the usage was not updated. (Closes: #23358)
authordaigo <beatles@users.sourceforge.jp>
Wed, 6 Oct 2010 13:39:22 +0000 (22:39 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Wed, 6 Oct 2010 13:39:22 +0000 (22:39 +0900)
Thanks to Hoki-san to report this issue.

changelog
mk_rate

index 36010b7..10bf44c 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,9 @@
+2010-10-06  Daigo Moriwaki <daigo at debian dot org>
+
+       * [shogi-server]
+         - mk_rate: the usage was not updated.
+           Thanks to Hoki-san to report this issue.  (Closes: #23358)
+
 2010-09-18  Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
diff --git a/mk_rate b/mk_rate
index f935acb..be2f8c0 100755 (executable)
--- a/mk_rate
+++ b/mk_rate
 #
 # == 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
 #
@@ -679,8 +686,14 @@ end
 
 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)