202 |
|
|
203 |
my $lookup = new WebPAC::Lookup( |
my $lookup = new WebPAC::Lookup( |
204 |
lookup_file => $input->{lookup}, |
lookup_file => $input->{lookup}, |
205 |
); |
) if ($input->{lookup}); |
206 |
|
|
207 |
my $input_module = $config->{webpac}->{inputs}->{$type}; |
my $input_module = $config->{webpac}->{inputs}->{$type}; |
208 |
|
|
209 |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module lookup '$input->{lookup}'"); |
$log->info("working on input '$input->{name}' in $input->{path} [type: $input->{type}] using $input_module", |
210 |
|
$input->{lookup} ? "lookup '$input->{lookup}'" : "" |
211 |
|
); |
212 |
|
|
213 |
my $input_db = new WebPAC::Input( |
my $input_db = new WebPAC::Input( |
214 |
module => $input_module, |
module => $input_module, |
224 |
my $maxmfn = $input_db->open( |
my $maxmfn = $input_db->open( |
225 |
path => $input->{path}, |
path => $input->{path}, |
226 |
code_page => $input->{encoding}, # database encoding |
code_page => $input->{encoding}, # database encoding |
227 |
|
%{ $input }, |
228 |
); |
); |
229 |
|
|
230 |
my $n = new WebPAC::Normalize::XML( |
my $n = new WebPAC::Normalize::XML( |
231 |
# filter => { 'foo' => sub { shift } }, |
# filter => { 'foo' => sub { shift } }, |
232 |
db => $db, |
db => $db, |
233 |
lookup_regex => $lookup->regex, |
lookup_regex => $lookup ? $lookup->regex : undef, |
234 |
lookup => $lookup, |
lookup => $lookup, |
235 |
prefix => $input->{name}, |
prefix => $input->{name}, |
236 |
); |
); |
291 |
$ds = WebPAC::Normalize::Set::data_structure( |
$ds = WebPAC::Normalize::Set::data_structure( |
292 |
row => $row, |
row => $row, |
293 |
rules => $rules, |
rules => $rules, |
294 |
lookup => $lookup->lookup_hash, |
lookup => $lookup ? $lookup->lookup_hash : undef, |
295 |
); |
); |
296 |
|
|
297 |
$db->save_ds( |
$db->save_ds( |