--- trunk/run.pl 2005/12/16 01:04:20 255 +++ trunk/run.pl 2005/12/18 21:06:39 285 @@ -9,7 +9,7 @@ use WebPAC::Common 0.02; use WebPAC::Lookup; -use WebPAC::Input::ISIS; +use WebPAC::Input::ISIS 0.02; use WebPAC::Store 0.03; use WebPAC::Normalize::XML; use WebPAC::Output::TT; @@ -76,8 +76,6 @@ foreach my $input (@inputs) { -print Dumper($input); - my $type = lc($input->{type}); die "I know only how to handle input type isis, not '$type'!\n" unless ($type eq 'isis'); @@ -95,7 +93,7 @@ ); my $maxmfn = $isis->open( - filename => $input->{path}, + path => $input->{path}, code_page => $input->{encoding}, # database encoding ); @@ -107,10 +105,19 @@ prefix => $input->{name}, ); - $n->open( - tag => $input->{normalize}->{tag}, - xml_file => $input->{normalize}->{path}, - ); + my $normalize_path = $input->{normalize}->{path}; + + if ($normalize_path =~ m/\.xml$/i) { + $n->open( + tag => $input->{normalize}->{tag}, + xml_file => $input->{normalize}->{path}, + ); + } elsif ($normalize_path =~ m/\.(?:yml|yaml)$/i) { + $n->open_yaml( + path => $normalize_path, + tag => $input->{normalize}->{tag}, + ); + } for ( 0 ... $isis->size ) {