/[Biblio-Isis]/trunk/scripts/dump_openisis.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/scripts/dump_openisis.pl

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

revision 12 by dpavlin, Tue Dec 28 01:41:45 2004 UTC revision 13 by dpavlin, Wed Dec 29 20:10:59 2004 UTC
# Line 5  Line 5 
5    
6  #use strict;  #use strict;
7  use OpenIsis;  use OpenIsis;
8    use Data::Dumper;
9    
10  my $db = OpenIsis::open( shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI' );  my $db = OpenIsis::open( shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI' );
11    my $debug = shift @ARGV;
12  my $maxmfn = OpenIsis::maxRowid( $db ) || 1;  my $maxmfn = OpenIsis::maxRowid( $db ) || 1;
13    
14  print "rows: $maxmfn\n\n";  print "rows: $maxmfn\n\n";
# Line 14  print "rows: $maxmfn\n\n"; Line 16  print "rows: $maxmfn\n\n";
16  for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) {  for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) {
17          print "0\t$mfn\n";          print "0\t$mfn\n";
18          my $row = OpenIsis::read( $db, $mfn );          my $row = OpenIsis::read( $db, $mfn );
19            if ($debug)  {
20                    print STDERR Dumper($row),"\n";
21                    my $rec;
22                    foreach my $f (keys %{$row}) {
23                            foreach my $v (@{$row->{$f}}) {
24                                    push @{$rec->{$f}}, OpenIsis::subfields($v);
25                            }
26                    }
27                    print STDERR Dumper($rec);
28            }
29          foreach my $k (sort keys %{$row}) {          foreach my $k (sort keys %{$row}) {
30                  next if ($k eq 'mfn');                  next if ($k eq 'mfn');
31                  print "$k\t",join("\n$k\t",@{$row->{$k}}),"\n";                  print "$k\t",join("\n$k\t",@{$row->{$k}}),"\n";

Legend:
Removed from v.12  
changed lines
  Added in v.13

  ViewVC Help
Powered by ViewVC 1.1.26