.PHONY: doc
doc: clean
rdoc --main README -o doc \
- . shogi-server README mk_html mk_rate
+ . shogi-server README mk_html mk_rate csa-file-filter
.PHONY: clean
clean:
* [mk_rate]
- Check kifu files more carefully so that files that contain
incomplete records are skipped.
- - mk_rate might have failed to alloc due to out of memory. Now it
- consumes less memory (about 200MB instead of 2GB).
+ - mk_rate might have failed to alloc due to out of memory. Now it
+ consumes less memory (about 200MB instead of 2GB).
+ - File names can be put into STDIN instead of specifying directory
+ names in command line arguments.
+ * [csa-file-filter]
+ - New file. It filters kifu files and is of use for a pre-filter
+ of mk_rate.
2008-12-13 Daigo Moriwaki <daigo at debian dot org>
$options["half-life-ignore"] = $options["half-life-ignore"].to_i
$options["fixed-rate"] = $options["fixed-rate"].to_i if $options["fixed-rate"]
- while dir = ARGV.shift do
- Dir.glob( File.join(dir, "**", "*.csa") ) {|f| grep(f)}
+ if ARGV.empty?
+ while line = $stdin.gets do
+ next unless %r!.*\.csa$! =~ line
+ grep line.strip
+ end
+ else
+ while dir = ARGV.shift do
+ Dir.glob( File.join(dir, "**", "*.csa") ) {|f| grep(f)}
+ end
end
yaml = {}