#!/usr/local/bin/perl
$who = shift;
print "$who\n";
print "date    rank  lines ratio  bytes  length\n";

@f = glob "../../????-??.itmonkey";
foreach $f (@f) {
  open(F, $f);
  while(<F>) {
    if (/([ 0-9]{3})\. $who +([0-9]+)\(([ 1-9][0-9].[0-9])\%\) +([0-9]+) +([0-9]+.[0-9]+)$/) {
      $n = $1; $l = $2; $r = $3; $b = $4; $m = $5;
      $_ = $f;
      ($year, $month) = m/([0-9]{4}).([0-9]{2})\.itmonkey/;
      printf "%4d-%02d %3d %7d %5.2f %7d %5.2f\n", $year, $month, $n, $l, $r, $b, $m;
    }
  }
  close(F);
}

    
