added -d path and -n flags
[Biblio-Isis] / scripts / dump_isisdb.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4 #use blib;
5
6 use Biblio::Isis;
7 use Getopt::Std;
8 use Data::Dumper;
9
10 my %opt;
11 getopts('dn:', \%opt);
12
13 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,
17         debug => $opt{'d'},
18         include_deleted => 1,
19 #       read_fdt => 1,
20 );
21
22 print "rows: ",$isis->count,"\n\n";
23
24 my $min = 1;
25 my $max = $isis->count;
26
27 for my $mfn ($min .. $max) {
28         print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($opt{'d'});
29         print $isis->to_ascii($mfn),"\n";
30
31 }
32