1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use strict; |
use strict; |
4 |
use Biblio::Isis; |
use Biblio::Isis 0.23; |
5 |
use Getopt::Std; |
use Getopt::Std; |
6 |
use Data::Dumper; |
use Data::Dumper; |
7 |
use XML::Simple; |
use XML::Simple; |
72 |
my %lhash; |
my %lhash; |
73 |
# this option will cache all lookup entries in memory. |
# this option will cache all lookup entries in memory. |
74 |
# if you are tight on memory, turn this off |
# if you are tight on memory, turn this off |
75 |
my $use_lhash_cache = 1; |
my $use_lhash_cache = 0; |
76 |
|
|
77 |
my $last_field_name; # cache to prevent repeated fields |
my $last_field_name; # cache to prevent repeated fields |
78 |
|
|
785 |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |
my $isis_db = $cfg -> val($database, 'isis_db') || die "$database doesn't have 'isis_db' defined!"; |
786 |
|
|
787 |
$import2cp = Text::Iconv->new($config->{isis_codepage},$codepage); |
$import2cp = Text::Iconv->new($config->{isis_codepage},$codepage); |
788 |
my $db = new Biblio::Isis( isisdb => $isis_db ) || next; |
my $db = new Biblio::Isis( |
789 |
|
isisdb => $isis_db, |
790 |
|
join_subfields_with => ' ; ', |
791 |
|
); |
792 |
|
|
793 |
if (! $db) { |
if (! $db) { |
794 |
print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n"; |
print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n"; |
1047 |
|
|
1048 |
# call this to commit index |
# call this to commit index |
1049 |
$index->close; |
$index->close; |
1050 |
|
warn "index closed, exiting...\n"; |
1051 |
|
|
1052 |
1; |
1; |
1053 |
__END__ |
__END__ |