/[wait]/cvs-head/script/index_mail
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 /cvs-head/script/index_mail

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

revision 47 by ulpfr, Fri Dec 29 15:33:06 2000 UTC revision 48 by ulpfr, Fri Dec 29 16:09:58 2000 UTC
# Line 1  Line 1 
1  #                              -*- Mode: Perl -*-  #                              -*- Mode: Perl -*-
2  # $Basename: index_mail $  # $Basename: index_mail $
3  # $Revision: 1.1 $  # $Revision: 1.2 $
4  # Author          : Ulrich Pfeifer  # Author          : Ulrich Pfeifer
5  # Created On      : Fri Apr  7 13:45:50 2000  # Created On      : Fri Apr  7 13:45:50 2000
6  # Last Modified By: Ulrich Pfeifer  # Last Modified By: Ulrich Pfeifer
7  # Last Modified On: Fri Dec 29 16:07:43 2000  # Last Modified On: Fri Dec 29 17:07:26 2000
8  # Language        : CPerl  # Language        : CPerl
9  #  #
10  # (C) Copyright 2000, UUNET Deutschland GmbH, Germany  # (C) Copyright 2000, UUNET Deutschland GmbH, Germany
# Line 78  my $access = tie %D, 'WAIT::Document::Sp Line 78  my $access = tie %D, 'WAIT::Document::Sp
78    or die "Couldn't tie to file: $!\n";    or die "Couldn't tie to file: $!\n";
79    
80  my $tb = $db->create_table(name     => $OPT{table},  my $tb = $db->create_table(name     => $OPT{table},
81                             attr     => ['docid', 'headline', 'text'],                             attr     => ['from', 'to', 'subject', 'article', 'docid', 'headline'],
82                             layout   => $layout,                             layout   => $layout,
83                             access   => $access,                             access   => $access,
84                             invindex =>                             invindex =>
# Line 95  while (($did, $value) = each %D) { Line 95  while (($did, $value) = each %D) {
95    my $record   = $layout->split($value);    my $record   = $layout->split($value);
96    my $headline = $record->{subject};    my $headline = $record->{subject};
97    $headline =~ s/\s+/ /sg;    $headline =~ s/\s+/ /sg;
98    printf "%s\n", substr($headline,0,80);    #printf "%s\n", substr($headline,0,80);
99    $tb->insert('docid'  => $did,    $tb->insert('docid'  => $did,
100                headline => $headline,                headline => $headline,
101                %{$record});                %{$record});
102      print $did,"\n" if $did =~ / 0 0/;
103  }  }
104  $tb->set(top=>1);  $tb->set(top=>1);
105  $tb->close();  $tb->close();

Legend:
Removed from v.47  
changed lines
  Added in v.48

  ViewVC Help
Powered by ViewVC 1.1.26