--- trunk/run.pl 2006/01/22 13:38:17 389 +++ trunk/run.pl 2006/03/22 00:18:56 423 @@ -13,7 +13,7 @@ use WebPAC::Store 0.03; use WebPAC::Normalize::XML; use WebPAC::Output::TT; -use WebPAC::Output::Estraier 0.08; +use WebPAC::Output::Estraier '0.10'; use YAML qw/LoadFile/; use Getopt::Long; use File::Path; @@ -41,9 +41,9 @@ remove database and Hyper Estraier index before indexing -=item --one=database_name +=item --only=database_name -reindex just single database +reindex just single database (legacy name is --one) =item --config conf/config.yml @@ -59,13 +59,14 @@ my $clean = 0; my $config = 'conf/config.yml'; my $debug = 0; -my $one_db_name; +my $only_db_name; GetOptions( "limit=i" => \$limit, "offset=i" => \$offset, "clean" => \$clean, - "one=s" => \$one_db_name, + "one=s" => \$only_db_name, + "only=s" => \$only_db_name, "config" => \$config, "debug" => \$debug, ); @@ -81,7 +82,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) { - next if ($one_db_name && $database !~ m/$one_db_name/i); + next if ($only_db_name && $database !~ m/$only_db_name/i); my $log = _new WebPAC::Common()->_get_logger(); @@ -92,6 +93,7 @@ my $est_config = $config->{hyperestraier} || $log->logdie("can't find 'hyperestraier' part in confguration"); $est_config->{database} = $database; $est_config->{clean} = $clean; + $est_config->{label} = $db_config->{name}; my $est = new WebPAC::Output::Estraier( %{ $est_config } ); @@ -107,7 +109,7 @@ $log->info("creating new database $database in $db_path"); rmtree( $db_path ) || $log->warn("can't remove $db_path: $!"); } else { - $log->info("working on $database in $db_path"); + $log->debug("working on $database in $db_path"); } my $db = new WebPAC::Store( @@ -144,7 +146,7 @@ my $input_module = $config->{webpac}->{inputs}->{$type}; - $log->info("working on input $input->{path} [$input->{type}] using $input_module"); + $log->info("working on input '$input->{path}' [$input->{type}] using $input_module lookup '$input->{lookup}'"); my $input_db = new WebPAC::Input( module => $input_module, @@ -152,6 +154,7 @@ limit => $limit || $input->{limit}, offset => $offset, lookup => $lookup, + recode => $input->{recode}, ); $log->logdie("can't create input using $input_module") unless ($input);