Parent Directory | Revision Log
first working version: - add support for repeatable fields (so all hash values becomed arrays, even with single element) - scripts to dump CDS/ISIS database using this module and OpenIsis - to_ascii method which dumps ascii output of record
1 | #!/usr/bin/perl -w |
2 | |
3 | # this utility emulates output of openisis -db "database" |
4 | # so you can test if perl can read your isis file |
5 | |
6 | #use strict; |
7 | use OpenIsis; |
8 | |
9 | my $db = OpenIsis::open( shift @ARGV || '/data/isis_data/ps/LIBRI/LIBRI' ); |
10 | my $maxmfn = OpenIsis::maxRowid( $db ) || 1; |
11 | |
12 | print "rows: $maxmfn\n\n"; |
13 | |
14 | for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) { |
15 | print "0\t$mfn\n"; |
16 | my $row = OpenIsis::read( $db, $mfn ); |
17 | foreach my $k (sort keys %{$row}) { |
18 | next if ($k eq 'mfn'); |
19 | print "$k\t",join("\n$k\t",@{$row->{$k}}),"\n"; |
20 | } |
21 | print "\n"; |
22 | } |
23 |
Name | Value |
---|---|
svn:executable | * |
ViewVC Help | |
Powered by ViewVC 1.1.26 |