1 |
#!/usr/bin/perl -w |
#!/usr/bin/perl -w |
2 |
|
|
3 |
use strict; |
use strict; |
4 |
use blib; |
#use blib; |
5 |
|
|
6 |
use Biblio::Isis; |
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 $isisdb = shift @ARGV || die "usage: $0 [-n number] [-d] /path/to/isis/BIBL\n"; |
14 |
|
|
15 |
my $isis = Biblio::Isis->new ( |
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->count,"\n\n"; |
print "rows: ",$isis->count,"\n\n"; |
23 |
|
|
24 |
for(my $mfn = 1; $mfn <= $isis->count; $mfn++) { |
my $min = 1; |
25 |
print STDERR Dumper($isis->to_hash($mfn)),"\n" if ($debug); |
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"; |
print $isis->to_ascii($mfn),"\n"; |
30 |
|
|
31 |
} |
} |