/[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 665 by dpavlin, Tue Feb 15 23:46:58 2005 UTC revision 674 by dpavlin, Thu Feb 17 18:18:49 2005 UTC
# Line 633  if ($my_unac_filter) { Line 633  if ($my_unac_filter) {
633    
634  foreach my $database ($cfg->Sections) {  foreach my $database ($cfg->Sections) {
635    
636            # save database name in global variable path for later
637            # (need for index filter creation)
638            $path = $database;
639    
640          my $type = lc($cfg -> val($database, 'type')) || die "$database doesn't have 'type' defined";          my $type = lc($cfg -> val($database, 'type')) || die "$database doesn't have 'type' defined";
641          my $add_xml = $cfg -> val($database, 'xml');    # optional          my $add_xml = $cfg -> val($database, 'xml');    # optional
642    
# Line 738  print STDERR "using: $type...\n"; Line 742  print STDERR "using: $type...\n";
742                  $import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);                  $import2cp = Text::Iconv->new($config->{isis_codepage},$codepage);
743                  my $db = new Biblio::Isis( isisdb => $isis_db ) || next;                  my $db = new Biblio::Isis( isisdb => $isis_db ) || next;
744    
745                  my $max_rowid = $db->count;                  if (! $db) {
   
                 if (! $max_rowid) {  
746                          print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n";                          print STDERR "FATAL: can't read ISIS database: $isis_db, skipping...\n";
747                          next;                          next;
748                  }                  }
749    
750                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";                  my $max_rowid = $db->count if ($db);
751    
752                  $path = $database;                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";
753    
754                  for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {                  for (my $row_id = 1; $row_id <= $max_rowid; $row_id++ ) {
755                          my $row = $db->to_hash( $row_id );                          my $row = $db->to_hash( $row_id );
# Line 830  print STDERR "using: $type...\n"; Line 832  print STDERR "using: $type...\n";
832                                  print "Document-Type: XML\n\n$xml\n";                                  print "Document-Type: XML\n\n$xml\n";
833                          }                          }
834                  }                  }
835    
836                    print STDERR "\n";
837    
838          } elsif ($type_base eq "marc") {          } elsif ($type_base eq "marc") {
839    
840                  require MARC::File::USMARC;                  require MARC::File::USMARC;

Legend:
Removed from v.665  
changed lines
  Added in v.674

  ViewVC Help
Powered by ViewVC 1.1.26