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

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

trunk/scripts/dump_isis.pl revision 15 by dpavlin, Wed Dec 29 22:46:40 2004 UTC trunk/scripts/dump_isisdb.pl revision 43 by dpavlin, Thu Jun 29 23:20:14 2006 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3  use strict;  use strict;
4  use blib;  #use blib;
5    
6  use IsisDB;  use Biblio::Isis;
7    use Getopt::Std;
8  use Data::Dumper;  use Data::Dumper;
9    
10  my $isisdb = shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI',  my %opt;
11  my $debug = shift @ARGV;  getopts('dn:', \%opt);
12    
13  my $isis = IsisDB->new (  my $isisdb = shift @ARGV || die "usage: $0 [-n number] [-d] /path/to/isis/BIBL\n";
14    
15    my $isis = Biblio::Isis->new (
16          isisdb => $isisdb,          isisdb => $isisdb,
17          debug => $debug,          debug => $opt{'d'},
18          include_deleted => 1,          include_deleted => 1,
19  #       read_fdt => 1,  #       read_fdt => 1,
20  );  );
21    
22  print "rows: ",$isis->{'maxmfn'},"\n\n";  print "rows: ",$isis->count,"\n\n";
23    
24    my $min = 1;
25    my $max = $isis->count;
26    $max = $opt{n} if ($opt{n});
27    
28  for(my $mfn = 1; $mfn <= $isis->{'maxmfn'}; $mfn++) {  for my $mfn ($min .. $max) {
29          print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($debug);          print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($opt{'d'});
30          print $isis->to_ascii($mfn),"\n";          print $isis->to_ascii($mfn),"\n";
31    
32  }  }

Legend:
Removed from v.15  
changed lines
  Added in v.43

  ViewVC Help
Powered by ViewVC 1.1.26