--- postanalog.orig Wed Jun 8 01:49:57 2005 +++ postanalog Thu Jun 9 00:02:35 2005 @@ -19,6 +19,10 @@ sub numstr { #no param, global variables used. chomp(); s/\s+$//; + s/\//; + s/\\//; + s/\<\/td\>\<\/tr\>//; + s/\<\/td\>\/: /; ($num,$str)=split(/: /,$_,2); $str='' unless defined $str; $sonotaexists=1 if $str =~ /^\[その他\: [\,\d]+ [\xa1-\xfe]+\]/; @@ -61,11 +65,11 @@ s/\\x([8-9a-f][0-9a-f])/pack("C",hex($1))/gie; s/%([2-9a-f][0-9a-f])/pack("C",hex($1))/gie; s/\&space\;/\%20/g; - $searchw=1 if /\/i; - $searchw=2 if /\/i; + $searchw=1 if /\\<\/pre\>/i) { + if(/\<\/tbody\>\<\/table\>/i) { print <<"_STR_" if $sonotaexists; analogの設定ミスで[その他:]として省略されpostanalogに入力されなかった検索語句があり、このレポートの順位や数字は不正確です。 _STR_ @@ -77,11 +81,13 @@ } $sonota=0; $sonotak=0; $tops=0; + $printlines=0; foreach $c (sort { 0+$b <=> 0+$a } keys %map) { foreach $w (sort keys %counts) { if($counts{$w}==$c) { if(!$floor || ($tops++ < $floor)) { - printf("%12d: %s \n", $c, $w); + print "" if ++$printlines == 1; + printf("%d%s\n", $c, $w); } else { $sonotak++; @@ -92,7 +98,7 @@ } if($sonota) { printf(<<"_STR_", $sonota, $sonotak, $floor); -%12d: [その他: %d 項目の表示をpostanalogが省略しました。上位 %d 位のみ表示です] +%d[その他: %d 項目の表示をpostanalogが省略しました。上位 %d 位のみ表示です] _STR_ } print; @@ -144,7 +150,7 @@ } next; } - $merging=1 if $searchw && /^------------: --/; + $merging=1 if $searchw && /^\\\リクエスト件数\<\/th\>/; print; }