/[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

Annotation of /trunk2/all2all.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 353 - (hide annotations)
Wed Jun 16 11:29:37 2004 UTC (15 years, 5 months ago) by dpavlin
File MIME type: text/plain
File size: 1535 byte(s)
varous clenups

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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26