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

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

cvs-head/script/index_mail revision 47 by ulpfr, Fri Dec 29 15:33:06 2000 UTC trunk/script/index_mail revision 109 by dpavlin, Tue Jul 13 17:50:27 2004 UTC
# Line 1  Line 1 
1    #!/usr/bin/perl -w
2  #                              -*- Mode: Perl -*-  #                              -*- Mode: Perl -*-
3  # $Basename: index_mail $  # $Basename: index_mail $
4  # $Revision: 1.1 $  # $Revision: 1.3 $
5  # Author          : Ulrich Pfeifer  # Author          : Ulrich Pfeifer
6  # Created On      : Fri Apr  7 13:45:50 2000  # Created On      : Fri Apr  7 13:45:50 2000
7  # Last Modified By: Ulrich Pfeifer  # Last Modified By: Ulrich Pfeifer
8  # Last Modified On: Fri Dec 29 16:07:43 2000  # Last Modified On: Fri Dec 29 17:07:26 2000
9  # Language        : CPerl  # Language        : CPerl
10  #  #
11  # (C) Copyright 2000, UUNET Deutschland GmbH, Germany  # (C) Copyright 2000, UUNET Deutschland GmbH, Germany
# Line 78  my $access = tie %D, 'WAIT::Document::Sp Line 79  my $access = tie %D, 'WAIT::Document::Sp
79    or die "Couldn't tie to file: $!\n";    or die "Couldn't tie to file: $!\n";
80    
81  my $tb = $db->create_table(name     => $OPT{table},  my $tb = $db->create_table(name     => $OPT{table},
82                             attr     => ['docid', 'headline', 'text'],                             attr     => ['from', 'to', 'subject', 'article', 'docid', 'headline'],
83                             layout   => $layout,                             layout   => $layout,
84                             access   => $access,                             access   => $access,
85                             invindex =>                             invindex =>
# Line 95  while (($did, $value) = each %D) { Line 96  while (($did, $value) = each %D) {
96    my $record   = $layout->split($value);    my $record   = $layout->split($value);
97    my $headline = $record->{subject};    my $headline = $record->{subject};
98    $headline =~ s/\s+/ /sg;    $headline =~ s/\s+/ /sg;
99    printf "%s\n", substr($headline,0,80);    #printf "%s\n", substr($headline,0,80);
100    $tb->insert('docid'  => $did,    $tb->insert('docid'  => $did,
101                headline => $headline,                headline => $headline,
102                %{$record});                %{$record});
103      print $did,"\n" if $did =~ / 0 0/;
104  }  }
105  $tb->set(top=>1);  $tb->set(top=>1);
106  $tb->close();  $tb->close();
# Line 150  directory specified during configuration Line 152  directory specified during configuration
152    
153  Specify an alternate table name. Default is C<bibdb>.  Specify an alternate table name. Default is C<bibdb>.
154    
155    =back
156    
157  =head1 AUTHOR  =head1 AUTHOR
158    
159  Ulrich Pfeifer E<lt>F<pfeifer@wait.de>E<gt>  Ulrich Pfeifer E<lt>F<pfeifer@wait.de>E<gt>

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

  ViewVC Help
Powered by ViewVC 1.1.26