--- trunk/run.pl 2005/12/05 17:47:23 213 +++ trunk/run.pl 2005/12/15 14:12:00 251 @@ -28,29 +28,20 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { - my $type = lc($db_config->{input}->{type}); - - die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis'); - my $abs_path = abs_path($0); $abs_path =~ s#/[^/]*$#/#; - my $lookup = new WebPAC::Lookup( - lookup_file => $db_config->{input}->{lookup}, - ); - my $db_path = $config->{webpac}->{db_path} . '/' . $database; - - my $log = $lookup->_get_logger; - $log->info("working on $database in $db_path"); - - my $path = './db/'; - my $db = new WebPAC::Store( path => $db_path, + database => $database, + debug => 1, ); + my $log = $db->_get_logger; + $log->info("working on $database in $db_path"); + my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration"); $est_config->{database} = $database; @@ -72,11 +63,21 @@ } foreach my $input (@inputs) { + + my $type = lc($input->{type}); + + die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis'); + + my $lookup = new WebPAC::Lookup( + lookup_file => $input->{lookup}, + ); + $log->info("working on input $input->{path} [$input->{type}]"); my $isis = new WebPAC::Input::ISIS( code_page => $config->{webpac}->{webpac_encoding}, limit_mfn => $input->{limit}, + lookup => $lookup, ); my $maxmfn = $isis->open( @@ -84,11 +85,14 @@ code_page => $input->{encoding}, # database encoding ); +$log->info( Dumper($lookup->{_lookup_data}) ); + my $n = new WebPAC::Normalize::XML( # filter => { 'foo' => sub { shift } }, db => $db, lookup_regex => $lookup->regex, lookup => $lookup, + prefix => $input->{name}, ); $n->open(