#!/usr/local/bin/ruby teams = %w(chomp nihan teambs fantastic atob rikka galliver) point = {} for t in teams point[t] = 0 end Dir.foreach(".") {|dir| next unless test(?d, dir) next if /^\./ =~ dir # dir is the same as users login name Dir.foreach(dir){|pt| next if /^\./ =~ pt file = "#{dir}/#{pt}" next unless test(?f, file) team = open(file, "r").gets.chomp! if point.has_key?(team) then point[team] += pt.to_i end } } puts '
" printf "%s (%3d) | \n", t, point[t] pt = point[t] print "\n "
printf '![]() |