Hyper Estraierを使ってみた。
設定方法はこの辺が詳しい。
Sambaで共有したファイルなので日本語パスが化けた。
面倒なので適当に index.cgi 作る。
use strict;
use warnings;
use Encode;
use CGI qw/-no_xhtml/;
use HTTP::Lite;
my $http = new HTTP::Lite;
my $req = $http->request("http://localhost/cgi-bin/hyperestraier/estseek.cgi?" . $ENV{'QUERY_STRING'})
or die "Unable to get document: $!";
my $q = new CGI;
$q->charset('UTF-8');
print $q->header(
-charset=>'utf-8'
, -pragma => 'no-cache'
, -cache_control => 'no-store, no-cache'
);
my @html = split("\n", $http->body());
foreach my $line (@html)
{
$line =~ s/estseek\.cgi/index.cgi/g;
if($line =~ /<a href="(.*)" class="doc_title">/)
{
my $str = $1;
$str =~ tr/+/ /;
$str =~ s/%([0-9A-Fa-f][0-9A-Fa-f])/pack('H2', $1)/eg;
$line =~ s/(<a href=").*(" class="doc_title")>/$1$str$2 target="_blank">/;
}
print $line, "\n";
}
ieならこれで充分だろ。
xlhtml が帰ってこない。パッチがあった。
何かまだ遅い。
xlhtml が巨大な HTML テーブルを吐くこれかも。
| perl -pe 's"<TD[^>]*>( )*</TD>\n""g' | grep -v '<TR></TR>'で、よくなった気がする。