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

Diff of /trunk2/all2all.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 362 by dpavlin, Wed Jun 16 16:50:30 2004 UTC revision 370 by dpavlin, Thu Jun 17 17:25:12 2004 UTC
# Line 16  use WebPAC; Line 16  use WebPAC;
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 => [
# Line 34  my $maxmfn = $webpac->open_isis( Line 34  my $maxmfn = $webpac->open_isis(
34    
35  print "rows: $maxmfn\n\n";  print "rows: $maxmfn\n\n";
36    
37  while (my $rec = $webpac->fetch_rec) {  $webpac->open_import_xml(type => 'isis_hidra_ths');
   
         print "-- ",$webpac->parse($rec,'v250^a / [v562^4] v562^a'),"\n";  
38    
39          print " ",  while (my $rec = $webpac->fetch_rec) {
                 $webpac->parse($rec,'eval{v901^a eq "Deskriptor"}v250^a / [v562^4] v562^a'),  
                 $webpac->parse($rec,'eval{v901^a ne "Deskriptor"}250a [251]'),  
                 "\n";  
   
         my @t = $webpac->fill_in($rec,'v553^1;;v553^a');  
         print " Uži pojam: ",join("\t\n",@t),"\n" if (@t);  
40    
41          @t = $webpac->fill_in($rec,'eval{v901^a eq "Područje"}[a:v251::];;[d:[a:v251::]]');          my @ds = $webpac->data_structure($rec);
         print " Područje: ",join("\t\n",@t),"\n" if (@t);  
42    
43          @t = $webpac->fill_in($rec,'eval{v901^a eq "Mikrotezaurus"}[a:v561^4:v251:];;[d:[a:v561^4:v251:]]');          print $webpac->output(
44          print " Mikrotezaurus: ",join("\t\n",@t),"\n" if (@t);                  template => 'text.tt',
45                    data => \@ds,
46            ) if (@ds);
47    
         @t = $webpac->fill_in($rec,'eval{v901^a eq "Deskriptor"}[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'});

Legend:
Removed from v.362  
changed lines
  Added in v.370

  ViewVC Help
Powered by ViewVC 1.1.26