/[webpac]/trunk2/all2all.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

Contents of /trunk2/all2all.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 357 - (show annotations)
Wed Jun 16 13:39:17 2004 UTC (15 years, 4 months ago) by dpavlin
File MIME type: text/plain
File size: 1550 byte(s)
implement limit_mfn

1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 all2all.pl - basic script for all WebPAC needs
6
7 =cut
8
9 use strict;
10 use Data::Dumper;
11 use Carp;
12
13 use lib './lib';
14 use WebPAC;
15
16 my $webpac = new WebPAC(
17 code_page => 'ISO-8859-2',
18 limit_mfn => 500,
19 ) || die;
20
21 $|=1;
22
23 print "reading database\n";
24 my $maxmfn = $webpac->open_isis(
25 filename => shift @ARGV || '/data/hidra/THS/THS',
26 lookup => [
27 { 'key' => 'd:v900', 'val' => 'v250^a' },
28 # { 'eval' => '"v901^a" eq "Podruèje"', 'key' => 'pa:v561^4:v562^4:v461^1', 'val' => 'v900' },
29 # { 'eval '=> '"v901^a" eq "Mikrotezaurus"', 'key' => 'a:v561^4:v562^4:v461^1', 'val' => 'v900' },
30 # { 'eval' => '"v901^a" eq "Deskriptor"', 'key' => 'a:v561^4:v562^4:v461^1', 'val' => 'v900' },
31 { 'key' => 'a:v561^4:v562^4:v461^1', 'val' => 'v900' },
32 ],
33 );
34
35 print "rows: $maxmfn\n\n";
36
37 for (my $mfn = 1; $mfn <= $maxmfn; $mfn++) {
38 my $rec = $webpac->{'data'}->{$mfn} || die "no record with mfn $mfn";
39
40 print "-- ",$webpac->fill_in($rec,'v250^a (v901^a)'),"\n";
41
42 my @t = $webpac->fill_in($rec,'v553^1;;v553^a');
43 print " U¾i pojam: ",join("\t\n",@t),"\n" if (@t);
44
45 @t = $webpac->fill_in($rec,'[a:v251::];;[d:[a:v251::]]');
46 print " Podruèje: ",join("\t\n",@t),"\n" if (@t);
47
48 @t = $webpac->fill_in($rec,'[a:v561^4:v251:];;[d:[a:v561^4:v251:]]');
49 print " Mikrotezaurus: ",join("\t\n",@t),"\n" if (@t);
50
51 @t = $webpac->fill_in($rec,'[a:v561^4:v562^4:v900];;[d:[a:v561^4:v562^4:v900]]');
52 print " Deskriptor: ",join("\t\n",@t),"\n" if (@t);
53 }
54
55 print "## lookup ",Dumper($webpac->{'lookup'});
56 print "## data ",Dumper($webpac->{'data'});

Properties

Name Value
cvs2svn:cvs-rev 1.64
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26