/[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 566 by dpavlin, Sun Oct 31 18:43:33 2004 UTC revision 587 by dpavlin, Sat Nov 6 21:00:14 2004 UTC
# Line 178  while (my $rec = $webpac->fetch_rec) { Line 178  while (my $rec = $webpac->fetch_rec) {
178    
179                  # strip all non word characters from beginning or end                  # strip all non word characters from beginning or end
180                  # of word                  # of word
181                  my $words = join(" ",@{$ds->{'swish'}});                  my $words = unac(join(" ",@{$ds->{'swish'}}));
182                  $words =~ s/^\W+//;                  $words =~ s/^\W+//;
183                  $words =~ s/\W*\s+\W*/ /g;                  $words =~ s/\W*\s+\W*/ /g;
184                  $words =~ s/\W+$//;                  $words =~ s/\W+$//;
# Line 195  while (my $rec = $webpac->fetch_rec) { Line 195  while (my $rec = $webpac->fetch_rec) {
195                          #path => $f,                          #path => $f,
196                          path => $webpac->mfn,                          path => $webpac->mfn,
197                          headline => $h,                          headline => $h,
198                          words => unac($words),                          words => $words,
199                  );                  );
200          }          }
201    
# Line 276  my @tree = ({ Line 276  my @tree = ({
276                                  return(9, $l->{"a:$code:"} ) if (defined($l->{"a:$code:"}));                                  return(9, $l->{"a:$code:"} ) if (defined($l->{"a:$code:"}));
277                          },                          },
278          style           => 'display: none',          style           => 'display: none',
279            iframe          => 1,
280          },{          },{
281          # 1          # 1
282          code_arr        => sub { @{$_[0]} },          code_arr        => sub { @{$_[0]} },
# Line 293  my @tree = ({ Line 294  my @tree = ({
294          lookup_term     => sub { shift @{$l->{"d:".$_[0]}} },          lookup_term     => sub { shift @{$l->{"d:".$_[0]}} },
295          lookup_mfn      => sub { shift @{$l->{"900_mfn:".$_[0]}} },          lookup_mfn      => sub { shift @{$l->{"900_mfn:".$_[0]}} },
296          have_children   => sub { return $l->{"a:".$_[1].":".$_[0]} },          have_children   => sub { return $l->{"a:".$_[1].":".$_[0]} },
297          #style          => 'display: none',          style           => 'display: none',
298          },{          },{
299          # 3 uži pojam          # 3 uži pojam
300          code_arr        => sub { @{$_[0]} },          code_arr        => sub { @{$_[0]} },
# Line 357  my @tree = ({ Line 358  my @tree = ({
358    
359  my $tree = new WebPAC::Tree(  my $tree = new WebPAC::Tree(
360          tree => \@tree,          tree => \@tree,
361            detail_url => sub {
362                    my $mfn = shift;
363                    my $url = "thes/${mfn}.html";
364                    return $url if (-e "./out/$url");
365            },
366            nodes_dir => 'nodes',
367  );  );
368    
369  $tree->output(  $tree->output(
370          dir => './out',          dir => './out',
371          html => 'browse.html',          html => 'browse.html',
372          template => './output_template/tree.tt',          template_dir => './output_template/',
373            template_tree => 'tree.tt',
374            template_node => 'node.tt',
375          js => 'tree-ids.js',          js => 'tree-ids.js',
376  );  );
377    
378  $tree->output(  $tree->output(
379          dir => './eurovoc',          dir => './eurovoc',
380          html => 'hijerarhija.html',          html => 'hijerarhija.html',
381          template => './output_template/hijerarhija.tt',          template_dir => './output_template/',
382            template_tree => 'hijerarhija.tt',
383            template_node => 'hijerarhija_node.tt',
384          js => 'tree-ids.js',          js => 'tree-ids.js',
385  );  );
386    

Legend:
Removed from v.566  
changed lines
  Added in v.587

  ViewVC Help
Powered by ViewVC 1.1.26