/[webpac]/branches/ffzg/all2xml.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/ffzg/all2xml.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 748 by dpavlin, Tue Jun 6 12:35:31 2006 UTC revision 766 by dpavlin, Thu Aug 23 22:32:15 2007 UTC
# Line 1  Line 1 
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;
# Line 72  my $cache;     # for cacheing Line 72  my $cache;     # for cacheing
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    
# Line 785  foreach my $database ($cfg->Sections) { Line 785  foreach my $database ($cfg->Sections) {
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";
# Line 1044  foreach my $database ($cfg->Sections) { Line 1047  foreach my $database ($cfg->Sections) {
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__

Legend:
Removed from v.748  
changed lines
  Added in v.766

  ViewVC Help
Powered by ViewVC 1.1.26