/[webpac]/trunk/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 /trunk/all2xml.pl

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

revision 650 by dpavlin, Thu Jan 27 20:23:36 2005 UTC revision 672 by dpavlin, Thu Feb 17 18:08:14 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 );                  my $db = new Biblio::Isis( isisdb => $isis_db );
744    
745                  my $max_rowid = $db->count;                  my $max_rowid = $db->count if ($db);
746    
747                  if (! $max_rowid) {                  if (! $max_rowid) {
748                          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 747  print STDERR "using: $type...\n"; Line 751  print STDERR "using: $type...\n";
751    
752                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";                  print STDERR "Reading database: $isis_db [$max_rowid rows]\n";
753    
                 $path = $database;  
   
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 );
756                          if ($row) {                          if ($row) {
# 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.650  
changed lines
  Added in v.672

  ViewVC Help
Powered by ViewVC 1.1.26