16 |
my $webpac = new WebPAC( |
my $webpac = new WebPAC( |
17 |
code_page => 'ISO-8859-2', |
code_page => 'ISO-8859-2', |
18 |
limit_mfn => 500, |
limit_mfn => 500, |
19 |
|
debug => 1, |
20 |
) || die; |
) || die; |
21 |
|
|
22 |
$|=1; |
$|=1; |
23 |
|
|
|
print "reading database\n"; |
|
24 |
my $maxmfn = $webpac->open_isis( |
my $maxmfn = $webpac->open_isis( |
25 |
filename => shift @ARGV || '/data/hidra/THS/THS', |
filename => shift @ARGV || '/data/hidra/THS/THS', |
26 |
lookup => [ |
lookup => [ |
34 |
|
|
35 |
print "rows: $maxmfn\n\n"; |
print "rows: $maxmfn\n\n"; |
36 |
|
|
37 |
for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) { |
$webpac->open_import_xml(type => 'isis_hidra_ths'); |
|
my $rec = $webpac->{'data'}->{$mfn} || die "no record with mfn $mfn"; |
|
38 |
|
|
39 |
print "-- ",$webpac->fill_in($rec,'v250^a (v901^a)'),"\n"; |
while (my $rec = $webpac->fetch_rec) { |
40 |
|
|
41 |
my @t = $webpac->fill_in($rec,'v553^1;;v553^a'); |
my @ds = $webpac->data_structure($rec); |
|
print " Uži pojam: ",join("\t\n",@t),"\n" if (@t); |
|
42 |
|
|
43 |
@t = $webpac->fill_in($rec,'[a:v251::];;[d:[a:v251::]]'); |
print $webpac->output( |
44 |
print " Područje: ",join("\t\n",@t),"\n" if (@t); |
template => 'text.tt', |
45 |
|
data => \@ds, |
46 |
|
) if (@ds); |
47 |
|
|
|
@t = $webpac->fill_in($rec,'[a:v561^4:v251:];;[d:[a:v561^4:v251:]]'); |
|
|
print " Mikrotezaurus: ",join("\t\n",@t),"\n" if (@t); |
|
|
|
|
|
@t = $webpac->fill_in($rec,'[a:v561^4:v562^4:v900];;[d:[a:v561^4:v562^4:v900]]'); |
|
|
print " Deskriptor: ",join("\t\n",@t),"\n" if (@t); |
|
48 |
} |
} |
49 |
|
|
50 |
print "## lookup ",Dumper($webpac->{'lookup'}); |
print "## lookup ",Dumper($webpac->{'lookup'}); |