You can subscribe to this list here.
| 2003 |
Jan
|
Feb
(160) |
Mar
(119) |
Apr
(111) |
May
(118) |
Jun
(101) |
Jul
(304) |
Aug
(113) |
Sep
(140) |
Oct
(137) |
Nov
(87) |
Dec
(122) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(78) |
Feb
(125) |
Mar
(131) |
Apr
(59) |
May
(121) |
Jun
(166) |
Jul
(150) |
Aug
(137) |
Sep
(73) |
Oct
(58) |
Nov
(27) |
Dec
(60) |
| 2005 |
Jan
(131) |
Feb
(84) |
Mar
(36) |
Apr
(8) |
May
(28) |
Jun
(20) |
Jul
(10) |
Aug
(72) |
Sep
(76) |
Oct
(34) |
Nov
(3) |
Dec
(29) |
| 2006 |
Jan
(13) |
Feb
(92) |
Mar
(7) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(4) |
Aug
(17) |
Sep
(5) |
Oct
(2) |
Nov
(8) |
Dec
(12) |
| 2007 |
Jan
(28) |
Feb
(15) |
Mar
|
Apr
|
May
(8) |
Jun
(4) |
Jul
(5) |
Aug
(8) |
Sep
(20) |
Oct
(38) |
Nov
(65) |
Dec
(92) |
| 2008 |
Jan
(21) |
Feb
(56) |
Mar
(27) |
Apr
(174) |
May
(25) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <jgr...@us...> - 2003-06-14 21:10:15
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv29263/UI
Modified Files:
HTML.pm HTTP.pm XMLRPC.pm
Log Message:
Added new message queuing engine for asynchronous message passing, use it for classification data and UI registrations, remove mcount and ecount global variables, add new access to all configuration options on Advanced page
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.168
retrieving revision 1.169
diff -C2 -d -r1.168 -r1.169
*** HTML.pm 9 Jun 2003 22:39:18 -0000 1.168
--- HTML.pm 14 Jun 2003 21:10:12 -0000 1.169
***************
*** 92,95 ****
--- 92,99 ----
$self->{languages__} = ();
+ # The last user to login via a proxy
+
+ $self->{last_login__} = '';
+
# Must call bless before attempting to call any methods
***************
*** 193,196 ****
--- 197,209 ----
$self->{url_handler_} = \&url_handler__;
+ # Finally register for the messages that we need to receive
+
+ $self->mq_register_( 'CLASS', $self );
+ $self->mq_register_( 'UIREG', $self );
+ $self->mq_register_( 'TICKD', $self );
+ $self->mq_register_( 'LOGIN', $self );
+
+ $self->calculate_today();
+
return 1;
}
***************
*** 207,215 ****
my ( $self ) = @_;
- # This needs to occur at launch, but after initialization
-
- $self->remove_mail_files();
- $self->calculate_today();
-
# Ensure that the messages subdirectory exists
--- 220,223 ----
***************
*** 232,235 ****
--- 240,245 ----
$self->sort_filter_history( '', '', '' );
+ $self->remove_mail_files();
+
return $self->SUPER::start();
}
***************
*** 237,252 ****
# ---------------------------------------------------------------------------------------------
#
! # service
#
! # Called to handle interface requests
#
# ---------------------------------------------------------------------------------------------
! sub service
{
! my ( $self ) = @_;
! $self->remove_mail_files();
! return $self->SUPER::service();
}
--- 247,286 ----
# ---------------------------------------------------------------------------------------------
#
! # deliver
#
! # Called by the message queue to deliver a message
! #
! # There is no return value from this method
#
# ---------------------------------------------------------------------------------------------
! sub deliver
{
! my ( $self, $type, $message, $parameter ) = @_;
! # Handle registration of UI components
! if ( $type eq 'UIREG' ) {
! $message =~ /(.*):(.*)/;
!
! $self->register_configuration_item__( $1, $2, $parameter );
! }
!
! # Invalidate the history cache if a classification occurs
!
! if ( $type eq 'CLASS' ) {
! $self->invalidate_history_cache();
! }
!
! # If a day has passed then clean up the history
!
! if ( $type eq 'TICKD' ) {
! $self->remove_mail_files();
! }
!
! # We keep track of the last username to login to show on the UI
!
! if ( $type eq 'LOGIN' ) {
! $self->{last_login__} = $message;
! }
}
***************
*** 369,374 ****
$redirect_url =~ s/&$//;
- $self->log_( "Correct password will redirect to $redirect_url" );
-
password_page( $self, $client, 0, $redirect_url );
--- 403,406 ----
***************
*** 424,438 ****
}
! my %url_table = ( '/security' => \&security_page,
! '/configuration' => \&configuration_page,
! '/buckets' => \&corpus_page,
! '/magnets' => \&magnet_page,
! '/advanced' => \&advanced_page,
! '/history' => \&history_page,
! '/view' => \&view_page,
! '/' => \&history_page );
# Any of the standard pages can be found in the url_table, the other pages are probably
# files on disk
if ( defined($url_table{$url}) ) {
&{$url_table{$url}}($self, $client);
--- 456,471 ----
}
! my %url_table = ( '/security' => \&security_page,
! '/configuration' => \&configuration_page,
! '/buckets' => \&corpus_page,
! '/magnets' => \&magnet_page,
! '/advanced' => \&advanced_page,
! '/history' => \&history_page,
! '/view' => \&view_page,
! '/' => \&history_page );
# Any of the standard pages can be found in the url_table, the other pages are probably
# files on disk
+
if ( defined($url_table{$url}) ) {
&{$url_table{$url}}($self, $client);
***************
*** 468,471 ****
--- 501,505 ----
# Check to see if we've checked for updates today. If we have not then insert a reference to an image
# that is generated through a CGI on UseTheSource. Also send stats to the same site if that is allowed
+
if ( $self->{today} ne $self->config_( 'last_update_check' ) ) {
calculate_today( $self );
***************
*** 480,484 ****
my @buckets = $self->{classifier__}->get_buckets();
my $bc = $#buckets + 1;
! $update_check .= "<img border=\"0\" alt=\"\" src=\"http://www.usethesource.com/cgi-bin/popfile_stats.pl?bc=$bc&mc=" . $self->global_config_( 'mcount' ) . "&ec=" . $self->global_config_( 'ecount' ) . "\" />\n";
}
--- 514,518 ----
my @buckets = $self->{classifier__}->get_buckets();
my $bc = $#buckets + 1;
! $update_check .= "<img border=\"0\" alt=\"\" src=\"http://www.usethesource.com/cgi-bin/popfile_stats.pl?bc=$bc&mc=" . $self->mcount__() . "&ec=" . $self->global_config_( 'ecount' ) . "\" />\n";
}
***************
*** 542,545 ****
--- 576,581 ----
}
+ $result .= "<link rel=\"icon\" href=\"popfile.ico\" type=\"image/ico\">\n";
+
$result .= "<meta http-equiv=\"Pragma\" content=\"no-cache\">\n";
$result .= "<meta http-equiv=\"Expires\" content=\"0\">\n";
***************
*** 706,710 ****
$result .= "<a class=\"bottomLink\" href=\"http://sourceforge.net/docman/display_doc.php?docid=14421&group_id=63137\">FAQ</a><br>\n";
! $result .= "</td><td class=\"footerBody\">\n<a class=\"bottomLink\" href=\"http://popfile.sourceforge.net/\"><img src=\"otto.gif\" border=\"0\" alt=\"\"></a><br>$self->{version_}<br>($time)</td>\n";
$result .= "<td class=\"footerBody\"><a class=\"bottomLink\" href=\"http://sourceforge.net/tracker/index.php?group_id=63137&atid=502959\">$self->{language__}{Footer_RequestFeature}</a><br>\n";
--- 742,746 ----
$result .= "<a class=\"bottomLink\" href=\"http://sourceforge.net/docman/display_doc.php?docid=14421&group_id=63137\">FAQ</a><br>\n";
! $result .= "</td><td class=\"footerBody\">\n<a class=\"bottomLink\" href=\"http://popfile.sourceforge.net/\"><img src=\"otto.gif\" border=\"0\" alt=\"\"></a><br>$self->{version_}<br>($time - $self->{last_login__})</td>\n";
$result .= "<td class=\"footerBody\"><a class=\"bottomLink\" href=\"http://sourceforge.net/tracker/index.php?group_id=63137&atid=502959\">$self->{language__}{Footer_RequestFeature}</a><br>\n";
***************
*** 1223,1226 ****
--- 1259,1274 ----
my ( $self, $client ) = @_;
+ # Handle updating the parameter table
+
+ if ( defined( $self->{form_}{update_params} ) ) {
+ foreach my $param (sort keys %{$self->{form_}}) {
+ if ( $param =~ /parameter_(.*)/ ) {
+ $self->{configuration__}->parameter( $1, $self->{form_}{$param} );
+ }
+ }
+
+ $self->{configuration__}->save_configuration();
+ }
+
my $add_message = '';
my $deletemessage = '';
***************
*** 1233,1237 ****
if ( defined($self->{form_}{word}) ) {
- $self->log_($self->{form_}{word} );
my $result = $self->{classifier__}->remove_stopword( $self->{form_}{word} );
if ( $result == 0 ) {
--- 1281,1284 ----
***************
*** 1241,1245 ****
# title and heading
! my $body = "<h2 class=\"advanced\">$self->{language__}{Advanced_StopWords}</h2>\n";
$body .= "$self->{language__}{Advanced_Message1}\n<br /><br />\n<table summary=\"$self->{language__}{Advanced_MainTableSummary}\">\n";
--- 1288,1292 ----
# title and heading
! my $body = "<table cellpadding=\"10%\" cellspacing=\"0\" class=\"settingsTable\"><tr><td class=\"settingsPanel\" valign=\"top\"><h2 class=\"advanced\">$self->{language__}{Advanced_StopWords}</h2>\n";
$body .= "$self->{language__}{Advanced_Message1}\n<br /><br />\n<table summary=\"$self->{language__}{Advanced_MainTableSummary}\">\n";
***************
*** 1309,1313 ****
$body .= "</div>\n";
! http_ok($self, $client,$body,5);
}
--- 1356,1380 ----
$body .= "</div>\n";
! $body .= "</td><td class=\"settingsPanel\" width=\"50%\" valign=\"top\"><h2 class=\"advanced\">$self->{language__}{Advanced_AllParameters}</h2>\n<p>$self->{language__}{Advanced_Warning}";
!
! $body .= "<form action=\"/advanced\" method=\"POST\">\n";
! $body .= "<table width=\"100%\"><tr><th width=\"50%\">$self->{language__}{Advanced_Parameter}</th><th width=\"50%\">$self->{language__}{Advanced_Value}</th></tr>\n";
!
! my $last_module = '';
!
! foreach my $param ($self->{configuration__}->configuration_parameters()) {
! my $value = $self->{configuration__}->parameter( $param );
! $param =~ /^([^_]+)_/;
! if ( ( $last_module ne '' ) && ( $last_module ne $1 ) ) {
! $body .= "<tr><td colspan=\"2\"><hr></td></tr>";
! }
! $last_module = $1;
! $body .= "<tr><td>$param</td><td><input type=\"text\" name=\"parameter_$param\" value=\"$value\">";
! $body .= "<input type=\"hidden\" name=\"session\" value=\"$self->{session_key__}\" />\n</td></tr>\n";
! }
!
! $body .= "</table><p><input type=\"submit\" value=\"$self->{language__}{Update}\" name=\"update_params\"></form></td></tr></table>";
!
! $self->http_ok( $client, $body, 5 );
}
***************
*** 1586,1591 ****
my $percent = "0%";
if ( $self->{classifier__}->get_word_count() > 0 ) {
! $percent = int( 10000 * $bucket_count / $self->{classifier__}->get_word_count() ) / 100;
! $percent = "$percent%";
}
$body .= "</td>\n<td></td>\n</tr>\n<tr><td colspan=\"3\"><hr /></td></tr>\n";
--- 1653,1657 ----
my $percent = "0%";
if ( $self->{classifier__}->get_word_count() > 0 ) {
! $percent = sprintf( '%6.2f%%', int( 10000 * $bucket_count / $self->{classifier__}->get_word_count() ) / 100 );
}
$body .= "</td>\n<td></td>\n</tr>\n<tr><td colspan=\"3\"><hr /></td></tr>\n";
***************
*** 1681,1688 ****
if ( $s == 0 ) {
if ( $total_count == 0 ) {
! $percent = " (0%)";
} else {
! $percent = " ( " . int( $value * 10000 / $total_count ) / 100;
! $percent .= "%)";
}
}
--- 1747,1753 ----
if ( $s == 0 ) {
if ( $total_count == 0 ) {
! $percent = " ( 0.00%)";
} else {
! $percent = sprintf( ' (%.2f%%)', int( $value * 10000 / $total_count ) / 100 );
}
}
***************
*** 1735,1741 ****
if ( defined($self->{form_}{reset_stats}) ) {
! $self->global_config_( 'mcount', 0 );
! $self->global_config_( 'ecount', 0 );
! for my $bucket ($self->{classifier__}->get_buckets()) {
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 );
$self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', 0 );
--- 1800,1804 ----
if ( defined($self->{form_}{reset_stats}) ) {
! foreach my $bucket ($self->{classifier__}->get_buckets()) {
$self->{classifier__}->set_bucket_parameter( $bucket, 'count', 0 );
$self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', 0 );
***************
*** 1798,1802 ****
$self->{form_}{oname} = lc($self->{form_}{oname});
$self->{form_}{newname} = lc($self->{form_}{newname});
! $self->{classifier__}->rename_bucket( $self->{form_}{oname}, $self->{form_}{newname} );
$rename_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error5}, $self->{form_}{oname}, $self->{form_}{newname} ) . "</b></blockquote>";
}
--- 1861,1865 ----
$self->{form_}{oname} = lc($self->{form_}{oname});
$self->{form_}{newname} = lc($self->{form_}{newname});
! $self->{classifier__}->rename_bucket( $self->{form_}{oname}, $self->{form_}{newname} );
$rename_message = "<blockquote><b>" . sprintf( $self->{language__}{Bucket_Error5}, $self->{form_}{oname}, $self->{form_}{newname} ) . "</b></blockquote>";
}
***************
*** 1904,1915 ****
my $number = pretty_number( $self, $self->{classifier__}->get_word_count() );
! my $pmcount = pretty_number( $self, $self->global_config_( 'mcount' ) );
! my $pecount = pretty_number( $self, $self->global_config_( 'ecount' ) );
my $accuracy = $self->{language__}{Bucket_NotEnoughData};
my $percent = 0;
! if ( $self->global_config_( 'mcount' ) > $self->global_config_( 'ecount' ) ) {
! $percent = int( 10000 * ( $self->global_config_( 'mcount' ) - $self->global_config_( 'ecount' ) ) / $self->global_config_( 'mcount' ) ) / 100;
$accuracy = "$percent%";
! }
# finish off Summary panel
--- 1967,1978 ----
my $number = pretty_number( $self, $self->{classifier__}->get_word_count() );
! my $pmcount = pretty_number( $self, $self->mcount__() );
! my $pecount = pretty_number( $self, $self->ecount__() );
my $accuracy = $self->{language__}{Bucket_NotEnoughData};
my $percent = 0;
! if ( $self->mcount__() > $self->ecount__() ) {
! $percent = int( 10000 * ( $self->mcount__() - $self->ecount__() ) / $self->mcount__() ) / 100;
$accuracy = "$percent%";
! }
# finish off Summary panel
***************
*** 2111,2115 ****
}
}
! }
foreach my $bucket (@buckets) {
--- 2174,2178 ----
}
}
! }
foreach my $bucket (@buckets) {
***************
*** 2227,2231 ****
if ( ( $filter eq '' ) ||
( $self->{history__}{$file}{bucket} eq $filter ) ||
! ( ( $filter eq '__filter__magnet' ) && ( $self->{history__}{$file}{magnet} ne '' ) ) ||
( ( $filter eq '__filter__no__magnet' ) && ( $self->{history__}{$file}{magnet} eq '' ) ) ) {
if ( ( $search eq '' ) ||
--- 2290,2294 ----
if ( ( $filter eq '' ) ||
( $self->{history__}{$file}{bucket} eq $filter ) ||
! ( ( $filter eq '__filter__magnet' ) && ( $self->{history__}{$file}{magnet} ne '' ) ) ||
( ( $filter eq '__filter__no__magnet' ) && ( $self->{history__}{$file}{magnet} eq '' ) ) ) {
if ( ( $search eq '' ) ||
***************
*** 2267,2270 ****
--- 2330,2335 ----
my ($a1,$b1) = ($self->{history__}{$a}{$sort},
$self->{history__}{$b}{$sort});
+ $a1 =~ s/&(l|g)t;//ig;
+ $b1 =~ s/&(l|g)t;//ig;
$a1 =~ s/[^A-Z0-9]//ig;
$b1 =~ s/[^A-Z0-9]//ig;
***************
*** 2559,2564 ****
#
# ---------------------------------------------------------------------------------------------
! sub history_write_class {
!
my ( $self, $filename, $reclassified, $bucket, $usedtobe, $magnet ) = @_;
--- 2624,2629 ----
#
# ---------------------------------------------------------------------------------------------
! sub history_write_class
! {
my ( $self, $filename, $reclassified, $bucket, $usedtobe, $magnet ) = @_;
***************
*** 2596,2602 ****
#
# ---------------------------------------------------------------------------------------------
! sub history_load_class {
!
my ( $self, $filename ) = @_;
$filename =~ s/msg$/cls/;
--- 2661,2668 ----
#
# ---------------------------------------------------------------------------------------------
! sub history_load_class
! {
my ( $self, $filename ) = @_;
+
$filename =~ s/msg$/cls/;
***************
*** 3063,3067 ****
$body .= "$short_subject</a></td>\n<td>";
if ( $reclassified ) {
! $body .= "<font color=\"" . $self->{classifier__}->get_bucket_color($bucket) . "\">$bucket</font></td>\n<td>";
$body .= sprintf( $self->{language__}{History_Already}, ($self->{classifier__}->get_bucket_color($bucket) || ''), ($bucket || '') );
$body .= " <input type=\"submit\" class=\"undoButton\" name=\"undo_$i\" value=\"$self->{language__}{Undo}\">\n";
--- 3129,3133 ----
$body .= "$short_subject</a></td>\n<td>";
if ( $reclassified ) {
! $body .= "<a href=\"buckets?session=$self->{session_key__}&showbucket=$bucket\"><font color=\"" . $self->{classifier__}->get_bucket_color($bucket) . "\">$bucket</font></a></td>\n<td>";
$body .= sprintf( $self->{language__}{History_Already}, ($self->{classifier__}->get_bucket_color($bucket) || ''), ($bucket || '') );
$body .= " <input type=\"submit\" class=\"undoButton\" name=\"undo_$i\" value=\"$self->{language__}{Undo}\">\n";
***************
*** 3070,3074 ****
$body .= "$bucket</td>\n<td>";
} else {
! $body .= "<font color=\"" . $self->{classifier__}->get_bucket_color($bucket) . "\">$bucket</font></td>\n<td>";
}
--- 3136,3140 ----
$body .= "$bucket</td>\n<td>";
} else {
! $body .= "<a href=\"buckets?session=$self->{session_key__}&showbucket=$bucket\"><font color=\"" . $self->{classifier__}->get_bucket_color($bucket) . "\">$bucket</font></a></td>\n<td>";
}
***************
*** 3149,3154 ****
my $bucket = $self->{history__}{$mail_file}{bucket};
my $color = $self->{classifier__}->get_bucket_color($bucket);
!
! my $page_size = $self->config_( 'page_size' );
$self->{form_}{sort} = '' if ( !defined( $self->{form_}{sort} ) );
--- 3215,3219 ----
my $bucket = $self->{history__}{$mail_file}{bucket};
my $color = $self->{classifier__}->get_bucket_color($bucket);
! my $page_size = $self->config_( 'page_size' );
$self->{form_}{sort} = '' if ( !defined( $self->{form_}{sort} ) );
***************
*** 3492,3516 ****
{
my ( $self ) = @_;
- my $yesterday = defined($self->{today})?$self->{today}:0;
- $self->calculate_today();
! if ( $self->{today} > $yesterday ) {
! my @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*=*.msg" );
! foreach my $mail_file (@mail_files) {
! my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($mail_file);
! if ( $ctime < (time - $self->config_( 'history_days' ) * $seconds_per_day) ) {
! $self->history_delete_file( $mail_file, $self->config_( 'archive' ) );
! }
}
! # Clean up old style msg/cls files
! @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*_*.???" );
! foreach my $mail_file (@mail_files) {
! unlink($mail_file);
! }
}
}
--- 3557,3577 ----
{
my ( $self ) = @_;
! my @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*=*.msg" );
! foreach my $mail_file (@mail_files) {
! my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($mail_file);
! if ( $ctime < (time - $self->config_( 'history_days' ) * $seconds_per_day) ) {
! $self->history_delete_file( $mail_file, $self->config_( 'archive' ) );
}
+ }
! # Clean up old style msg/cls files
! @mail_files = glob( $self->global_config_( 'msgdir' ) . "popfile*_*.???" );
! foreach my $mail_file (@mail_files) {
! unlink($mail_file);
}
}
***************
*** 3657,3661 ****
# ---------------------------------------------------------------------------------------------
! # register_configuration_item
#
# $type The type of item (configuration, security or chain)
--- 3718,3722 ----
# ---------------------------------------------------------------------------------------------
! # register_configuration_item__
#
# $type The type of item (configuration, security or chain)
***************
*** 3712,3716 ****
#
# ---------------------------------------------------------------------------------------------
! sub register_configuration_item
{
my ( $self, $type, $name, $object ) = @_;
--- 3773,3777 ----
#
# ---------------------------------------------------------------------------------------------
! sub register_configuration_item__
{
my ( $self, $type, $name, $object ) = @_;
***************
*** 3746,3749 ****
--- 3807,3847 ----
return $line;
+ }
+
+
+ # ---------------------------------------------------------------------------------------------
+ #
+ # mcount__, ecount__ get the total message count, or the total error count
+ #
+ # ---------------------------------------------------------------------------------------------
+
+ sub mcount__
+ {
+ my ( $self ) = @_;
+
+ my $count = 0;
+
+ my @buckets = $self->{classifier__}->get_buckets();
+
+ foreach my $bucket (@buckets) {
+ $count += $self->{classifier__}->get_bucket_parameter( $bucket, 'count' );
+ }
+
+ return $count;
+ }
+
+ sub ecount__
+ {
+ my ( $self ) = @_;
+
+ my $count = 0;
+
+ my @buckets = $self->{classifier__}->get_buckets();
+
+ foreach my $bucket (@buckets) {
+ $count += $self->{classifier__}->get_bucket_parameter( $bucket, 'fpcount' );
+ }
+
+ return $count;
}
Index: HTTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTTP.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** HTTP.pm 9 Jun 2003 18:34:36 -0000 1.6
--- HTTP.pm 14 Jun 2003 21:10:13 -0000 1.7
***************
*** 213,216 ****
--- 213,218 ----
my $arg = $1;
+ my $need_array = defined( $self->{form_}{$arg} );
+
$self->{form_}{$arg} = $2;
$self->{form_}{$arg} =~ s/\+/ /g;
***************
*** 222,226 ****
# Push the value onto an array to allow for multiple values of the same name
! push( @{ $self->{form_}{$arg . "_array"} }, $self->{form_}{$arg} );
}
}
--- 224,230 ----
# Push the value onto an array to allow for multiple values of the same name
! if ( $need_array ) {
! push( @{ $self->{form_}{$arg . "_array"} }, $self->{form_}{$arg} );
! }
}
}
Index: XMLRPC.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/XMLRPC.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** XMLRPC.pm 26 Mar 2003 16:39:12 -0000 1.2
--- XMLRPC.pm 14 Jun 2003 21:10:13 -0000 1.3
***************
*** 65,75 ****
# item that needs a UI component
! $self->{ui__}->register_configuration_item( 'configuration',
! 'xmlrpc_port',
! $self );
! $self->{ui__}->register_configuration_item( 'security',
! 'xmlrpc_local',
! $self );
return 1;
--- 65,75 ----
# item that needs a UI component
! $self->register_configuration_item_( 'configuration',
! 'xmlrpc_port',
! $self );
! $self->register_configuration_item_( 'security',
! 'xmlrpc_local',
! $self );
return 1;
***************
*** 280,294 ****
return $self->{classifier__};
- }
-
- sub ui
- {
- my ( $self, $value ) = @_;
-
- if ( defined( $value ) ) {
- $self->{ui__} = $value;
- }
-
- return $self->{ui__};
}
--- 280,283 ----
|
|
From: <jgr...@us...> - 2003-06-14 21:10:15
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv29263/POPFile
Modified Files:
Configuration.pm Logger.pm Module.pm
Added Files:
MQ.pm
Log Message:
Added new message queuing engine for asynchronous message passing, use it for classification data and UI registrations, remove mcount and ecount global variables, add new access to all configuration options on Advanced page
--- NEW FILE: MQ.pm ---
# POPFILE LOADABLE MODULE
package POPFile::MQ;
use POPFile::Module;
@ISA = ( "POPFile::Module" );
#----------------------------------------------------------------------------
#
# This module handles POPFile's message queue. Every POPFile::Module is
# able to register with the MQ for specific message types and can also
# send messages without having to know which modules need to receive
# its messages.
#
# Message delivery is asynchronous and guaranteed.
#
# The following public functions are defined:
#
# register() - register for a specific message type and pass an object
# reference. will call that object's deliver() method to
# deliver messages
#
# post() - send a message of a specific type
#
# The current list of types is
#
# CLASS A message was classified, message is the bucket and the
# parameter is null (comes from Proxy::Proxy)
#
# UIREG Register a UI component, message is the component type
# and the parameter is a the element and reference to the
# object registering (comes from any component)
#
# TICKD Occurs when a day has passed since the last TICKD (this
# is generated by the POPFile::Logger module)
#
# LOGIN Occurs when a proxy logs into a remote server, the message
# is the username sent
#
# Copyright (c) 2001-2003 John Graham-Cumming
#
#----------------------------------------------------------------------------
use strict;
use warnings;
use locale;
#----------------------------------------------------------------------------
# new
#
# Class new() function
#----------------------------------------------------------------------------
sub new
{
my $type = shift;
my $self = POPFile::Module->new();
# These are the individual queues of message, indexed by type
# and written to by post().
$self->{queue__} = {};
# These are the registered objects for each type
$self->{waiters__} = {};
bless $self, $type;
$self->name( 'mq' );
return $self;
}
# ---------------------------------------------------------------------------------------------
#
# service
#
# Called to handle pending tasks for the module. Here we flush all queues
#
# ---------------------------------------------------------------------------------------------
sub service
{
my ( $self ) = @_;
# Iterate through all the messages in all the queues
for my $type (keys %{$self->{queue__}}) {
while ( my $ref = shift @{$self->{queue__}{$type}} ) {
if ( defined( $ref ) ) {
for my $waiter (@{$self->{waiters__}{$type}}) {
my $message = @$ref[0];
my $parameter = @$ref[1];
$waiter->deliver( $type, $message, $parameter );
}
} else {
last;
}
}
}
return 1;
}
#----------------------------------------------------------------------------
#
# register
#
# When a module wants to receive specific message types it calls this
# method with the type of message is wants to receive and the address
# of a callback function that will receive the messages
#
# $type A string identifying the message type
# $callback Reference to a function that takes three parameters
#
#----------------------------------------------------------------------------
sub register
{
my ( $self, $type, $callback ) = @_;
push @{$self->{waiters__}{$type}}, ( $callback );
}
#----------------------------------------------------------------------------
#
# post
#
# Called to send a message through the message queue
#
# $type A string identifying the message type
# $message The message
# $parameter Parameters to the message
#
#----------------------------------------------------------------------------
sub post
{
my ( $self, $type, $message, $parameter ) = @_;
push @{$self->{queue__}{$type}}, [ $message, $parameter ];
}
1;
Index: Configuration.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Configuration.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Configuration.pm 26 May 2003 22:19:53 -0000 1.18
--- Configuration.pm 14 Jun 2003 21:10:12 -0000 1.19
***************
*** 37,40 ****
--- 37,44 ----
$self->{configuration_parameters__} = {};
+ # Name of the PID file that we created
+
+ $self->{pid_file__} = '';
+
bless $self, $type;
***************
*** 75,85 ****
$self->global_config_( 'download_count', 0 );
- # We keep track of the total number of messages downloaded (the mcount)
- # and the total number of classification errors made (ecount) which is
- # actually the number of times a message is reclassified in the UI
-
- $self->global_config_( 'mcount', 0 );
- $self->global_config_( 'ecount', 0 );
-
# The default timeout in seconds for POP3 commands
$self->global_config_( 'timeout', 60 );
--- 79,82 ----
***************
*** 111,115 ****
my ( $self ) = @_;
! if ( open PID, '>' . $self->config_( 'piddir' ) . 'popfile.pid' ) {
print PID "$$\n";
close PID;
--- 108,127 ----
my ( $self ) = @_;
! # Check to see if the PID file is present, if it is then another POPFile
! # may be running, warn the user and terminate
!
! $self->{pid_file__} = $self->config_( 'piddir' ) . 'popfile.pid';
!
! if ( -e $self->{pid_file__} ) {
! my $error = "\n\nAnother copy of POPFile appears to be running. \nIf this is not the case then" .
! " delete the file \n$self->{pid_file__} and restart POPFile.\n\n";
!
! print $error;
! $self->log_( $error );
!
! return 0;
! }
!
! if ( open PID, ">$self->{pid_file__}" ) {
print PID "$$\n";
close PID;
***************
*** 130,134 ****
my ( $self ) = @_;
! unlink( $self->config_( 'piddir' ) . 'popfile.pid' );
}
--- 142,148 ----
my ( $self ) = @_;
! $self->save_configuration();
!
! unlink( $self->{pid_file__} );
}
***************
*** 211,216 ****
'debug', 'GLOBAL_debug',
- 'ecount', 'GLOBAL_ecount',
- 'mcount', 'GLOBAL_mcount',
'msgdir', 'GLOBAL_msgdir',
'subject', 'GLOBAL_subject',
--- 225,228 ----
***************
*** 329,332 ****
--- 341,353 ----
return $self->{configuration_parameters__}{$name};
+ }
+
+ # GETTER
+
+ sub configuration_parameters
+ {
+ my ( $self ) = @_;
+
+ return sort keys %{$self->{configuration_parameters__}};
}
Index: Logger.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** Logger.pm 9 Jun 2003 22:39:16 -0000 1.18
--- Logger.pm 14 Jun 2003 21:10:12 -0000 1.19
***************
*** 64,68 ****
$self->config_( 'logdir', './' );
! remove_debug_files( $self );
return 1;
--- 64,68 ----
$self->config_( 'logdir', './' );
! calculate_today__( $self );
return 1;
***************
*** 99,102 ****
--- 99,107 ----
if ( $self->{today__} > $yesterday ) {
+
+ # Inform other modules that a day has passed
+
+ $self->mq_post_( 'TICKD', '', '' );
+
my @debug_files = glob( $self->config_( 'logdir' ) . 'popfile*.log' );
Index: Module.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Module.pm 9 Jun 2003 18:32:10 -0000 1.9
--- Module.pm 14 Jun 2003 21:10:12 -0000 1.10
***************
*** 41,44 ****
--- 41,46 ----
# used as the key for this module in %components
#
+ # deliver() - called by the message queue to deliver a message
+ #
# The following methods are PROTECTED and should be accessed by sub classes:
#
***************
*** 47,50 ****
--- 49,58 ----
# config_() - gets or sets a configuration parameter for this module
#
+ # mq_post_() - post a message to the central message queue
+ #
+ # mq_register_() register for messages from the message queue
+ #
+ # register_configuration_item_() register a UI configuration item
+ #
# A note on the naming
#
***************
*** 95,98 ****
--- 103,110 ----
$self->{logger__} = 0; # PRIVATE
+ # A reference to the POPFile::MQ module
+
+ $self->{mq__} = 0;
+
# The name of this module
***************
*** 222,226 ****
#
# This is called when some module forks POPFile and is within the context of the child
! # process so that this module can close any duplicated file handles that are not needed.
#
# There is no return value from this method
--- 234,238 ----
#
# This is called when some module forks POPFile and is within the context of the child
! # process so that this module can close any duplicated file handles that are not needed.
#
# There is no return value from this method
***************
*** 234,237 ****
--- 246,263 ----
# ---------------------------------------------------------------------------------------------
#
+ # deliver
+ #
+ # Called by the message queue to deliver a message
+ #
+ # There is no return value from this method
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub deliver
+ {
+ my ( $self, $type, $message, $parameter ) = @_;
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
# log_
#
***************
*** 273,276 ****
--- 299,337 ----
# ---------------------------------------------------------------------------------------------
#
+ # mq_post_
+ #
+ # Called by a subclass to post a message to the message queue
+ #
+ # $type Type of message to send
+ # $message Message to send
+ # $parameter Message parameters
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub mq_post_
+ {
+ my ( $self, $type, $message, $parameter ) = @_;
+
+ return $self->{mq__}->post( $type, $message, $parameter );
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
+ # mq_register_
+ #
+ # Called by a subclass to register with the message queue for messages
+ #
+ # $type Type of message to send
+ # $object Callback object
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub mq_register_
+ {
+ my ( $self, $type, $object ) = @_;
+
+ return $self->{mq__}->register( $type, $object );
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
# global_config_
#
***************
*** 312,315 ****
--- 373,392 ----
}
+ # ---------------------------------------------------------------------------------------------
+ #
+ # register_configuration_item_
+ #
+ # Called by a subclass to register a UI element
+ #
+ # $type, $name, $object See register_configuration_item in UI::HTML
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub register_configuration_item_
+ {
+ my ( $self, $type, $name, $object ) = @_;
+
+ return $self->mq_post_( 'UIREG', "$type:$name", $object );
+ }
+
# GETTER/SETTER methods. Note that I do not expect documentation of these unless they
# are non-trivial since the documentation would be a waste of space
***************
*** 331,334 ****
--- 408,422 ----
# This method access the foo_ variable for reading or writing, $c->foo() read foo_ and
# $c->foo( 'foo' ) writes foo_
+
+ sub mq
+ {
+ my ( $self, $value ) = @_;
+
+ if ( defined( $value ) ) {
+ $self->{mq__} = $value;
+ }
+
+ return $self->{mq__};
+ }
sub configuration
|
|
From: <jgr...@us...> - 2003-06-14 21:10:15
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv29263/Classifier
Modified Files:
Bayes.pm MailParse.pm
Log Message:
Added new message queuing engine for asynchronous message passing, use it for classification data and UI registrations, remove mcount and ecount global variables, add new access to all configuration options on Advanced page
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.149
retrieving revision 1.150
diff -C2 -d -r1.149 -r1.150
*** Bayes.pm 9 Jun 2003 18:33:10 -0000 1.149
--- Bayes.pm 14 Jun 2003 21:10:12 -0000 1.150
***************
*** 127,130 ****
--- 127,135 ----
$self->config_( 'hostname', $self->{hostname__} );
+ # We want to hear about classification events so that we can
+ # update statistics
+
+ $self->mq_register_( 'CLASS', $self );
+
return 1;
}
***************
*** 168,171 ****
--- 173,196 ----
# ---------------------------------------------------------------------------------------------
#
+ # deliver
+ #
+ # Called by the message queue to deliver a message
+ #
+ # There is no return value from this method
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub deliver
+ {
+ my ( $self, $type, $message, $parameter ) = @_;
+
+ if ( $type eq 'CLASS' ) {
+ $self->set_bucket_parameter( $message, 'count',
+ $self->get_bucket_parameter( $message, 'count' ) + 1 );
+ $self->write_parameters();
+ }
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ #
# write_parameters
#
***************
*** 243,246 ****
--- 268,284 ----
}
+ sub set_value_
+ {
+ my ($self, $bucket, $word, $value) = @_;
+
+ if ( $word ne '' ) {
+ $word =~ /^(.)/;
+ my $i = ord($1);
+
+ $self->{matrix__}{$bucket}[$i] = '' if ( !defined($self->{matrix__}{$bucket}[$i]) );
+ $self->{matrix__}{$bucket}[$i] .= "|$word $value|" if ( ( $self->{matrix__}{$bucket}[$i] =~ s/\|\Q$word\E [\-\.\d]+\|/\|$word $value\|/ ) == 0 );
+ }
+ }
+
# ---------------------------------------------------------------------------------------------
#
***************
*** 252,271 ****
sub get_sort_value_
{
! my ($self, $bucket, $word) = @_;
! my $v = get_value_($self, $bucket, $word);
! return $self->{not_likely__} if $v == 0;
! return $v;
! }
!
! sub set_value_
! {
! my ($self, $bucket, $word, $value) = @_;
! if ( $word ne '' ) {
! $word =~ /^(.)/;
! my $i = ord($1);
! $self->{matrix__}{$bucket}[$i] = '' if ( !defined($self->{matrix__}{$bucket}[$i]) );
! $self->{matrix__}{$bucket}[$i] .= "|$word $value|" if ( ( $self->{matrix__}{$bucket}[$i] =~ s/\|\Q$word\E [\-\.\d]+\|/\|$word $value\|/ ) == 0 );
}
}
--- 290,301 ----
sub get_sort_value_
{
! my ( $self, $bucket, $word ) = @_;
! my $v = $self->get_value_( $bucket, $word );
! if ( $v == 0 ) {
! return $self->{not_likely__};
! } else {
! return $v;
}
}
***************
*** 381,385 ****
#
# ---------------------------------------------------------------------------------------------
-
sub load_bucket_
{
--- 411,414 ----
***************
*** 679,685 ****
$self->{scores__} .= "<input type=\"hidden\" name=\"count\" value=\"" . ($mlen + 1) . "\" />";
$self->{scores__} .= "<hr><b>$language{QuickMagnets}</b><p>\n<table class=\"top20Words\">\n<tr>\n<th scope=\"col\">$language{Magnet}</th>\n<th>$language{Magnet_Always}</th>\n";
!
my %types = get_magnet_types();
!
foreach my $type ( keys %types ) {
--- 708,714 ----
$self->{scores__} .= "<input type=\"hidden\" name=\"count\" value=\"" . ($mlen + 1) . "\" />";
$self->{scores__} .= "<hr><b>$language{QuickMagnets}</b><p>\n<table class=\"top20Words\">\n<tr>\n<th scope=\"col\">$language{Magnet}</th>\n<th>$language{Magnet_Always}</th>\n";
!
my %types = get_magnet_types();
!
foreach my $type ( keys %types ) {
***************
*** 687,709 ****
{
$i += 1;
!
!
$self->{scores__} .= "<tr><td scope=\"col\">$type: ";
$self->{scores__} .= "<select name=\"text$i\" id=\"\">\n";
!
foreach my $magnet ( 0 .. $#{$qm{$type}} ) {
$self->{scores__} .= "<option>" . Classifier::MailParse::splitline(@{$qm{$type}}[$magnet], 0) . "</option>\n";
}
! $self->{scores__} .= "</select>\n";
$self->{scores__} .= "</td><td>";
! $self->{scores__} .= "<input type=\"hidden\" name=\"type$i\" id=\"magnetsAddType\" value=\"$type\"/>";
$self->{scores__} .= "<select name=\"bucket$i\" id=\"magnetsAddBucket\">\n<option value=\"\"></option>\n";
!
foreach my $bucket (@buckets) {
$self->{scores__} .= "<option value=\"$bucket\">$bucket</option>\n";
}
!
$self->{scores__} .= "</select></td></tr>";
! }
}
--- 716,737 ----
{
$i += 1;
!
$self->{scores__} .= "<tr><td scope=\"col\">$type: ";
$self->{scores__} .= "<select name=\"text$i\" id=\"\">\n";
!
foreach my $magnet ( 0 .. $#{$qm{$type}} ) {
$self->{scores__} .= "<option>" . Classifier::MailParse::splitline(@{$qm{$type}}[$magnet], 0) . "</option>\n";
}
! $self->{scores__} .= "</select>\n";
$self->{scores__} .= "</td><td>";
! $self->{scores__} .= "<input type=\"hidden\" name=\"type$i\" id=\"magnetsAddType\" value=\"$type\"/>";
$self->{scores__} .= "<select name=\"bucket$i\" id=\"magnetsAddBucket\">\n<option value=\"\"></option>\n";
!
foreach my $bucket (@buckets) {
$self->{scores__} .= "<option value=\"$bucket\">$bucket</option>\n";
}
!
$self->{scores__} .= "</select></td></tr>";
! }
}
***************
*** 899,903 ****
if ( $line =~ /(^[ \t])|([:])/ ) {
if ( $msg_subject eq '' ) {
! $msg_head_before .= $msg_head_q . $line;
} else {
$msg_head_after .= $msg_head_q . $line;
--- 927,931 ----
if ( $line =~ /(^[ \t])|([:])/ ) {
if ( $msg_subject eq '' ) {
! $msg_head_before .= $msg_head_q . $line;
} else {
$msg_head_after .= $msg_head_q . $line;
***************
*** 906,914 ****
} else {
# Gather up any lines that are questionable
!
! $msg_head_q .= $line;
}
-
-
}
} else {
--- 934,940 ----
} else {
# Gather up any lines that are questionable
!
! $msg_head_q .= $line;
}
}
} else {
***************
*** 1058,1062 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_buckets
{
--- 1084,1087 ----
***************
*** 1075,1079 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_bucket_word_count
{
--- 1100,1103 ----
***************
*** 1093,1097 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_bucket_word_list
{
--- 1117,1120 ----
***************
*** 1112,1116 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_word_count
{
--- 1135,1138 ----
***************
*** 1130,1134 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_count_for_word
{
--- 1152,1155 ----
***************
*** 1136,1140 ****
my $value = $self->get_value_( $bucket, $word );
!
return int( exp( $value ) * $self->get_bucket_word_count( $bucket ) + 0.5 );
}
--- 1157,1161 ----
my $value = $self->get_value_( $bucket, $word );
!
return int( exp( $value ) * $self->get_bucket_word_count( $bucket ) + 0.5 );
}
***************
*** 1149,1153 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_bucket_unique_count
{
--- 1170,1173 ----
***************
*** 1166,1170 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_bucket_color
{
--- 1186,1189 ----
***************
*** 1184,1188 ****
#
# ---------------------------------------------------------------------------------------------
-
sub set_bucket_color
{
--- 1203,1206 ----
***************
*** 1202,1206 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_bucket_parameter
{
--- 1220,1223 ----
***************
*** 1227,1231 ****
#
# ---------------------------------------------------------------------------------------------
-
sub set_bucket_parameter
{
--- 1244,1247 ----
***************
*** 1246,1250 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_html_colored_message
{
--- 1262,1265 ----
***************
*** 1269,1273 ****
#
# ---------------------------------------------------------------------------------------------
-
sub create_bucket
{
--- 1284,1287 ----
***************
*** 1294,1298 ****
#
# ---------------------------------------------------------------------------------------------
-
sub delete_bucket
{
--- 1308,1311 ----
***************
*** 1320,1324 ****
#
# ---------------------------------------------------------------------------------------------
-
sub rename_bucket
{
--- 1333,1336 ----
***************
*** 1340,1344 ****
#
# ---------------------------------------------------------------------------------------------
-
sub add_message_to_bucket
{
--- 1352,1355 ----
***************
*** 1399,1403 ****
#
# ---------------------------------------------------------------------------------------------
-
sub remove_message_from_bucket
{
--- 1410,1413 ----
***************
*** 1458,1462 ****
#
# ---------------------------------------------------------------------------------------------
-
sub echo_to_dot_
{
--- 1468,1471 ----
***************
*** 1466,1470 ****
# Check for an abort
last if ( $self->{alive_} == 0 );
!
print $client $_ if ( defined( $client ) );
--- 1475,1479 ----
# Check for an abort
last if ( $self->{alive_} == 0 );
!
print $client $_ if ( defined( $client ) );
***************
*** 1483,1487 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_buckets_with_magnets
{
--- 1492,1495 ----
***************
*** 1500,1504 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_magnet_types_in_bucket
{
--- 1508,1511 ----
***************
*** 1517,1521 ****
#
# ---------------------------------------------------------------------------------------------
-
sub clear_bucket
{
--- 1524,1527 ----
***************
*** 1536,1540 ****
#
# ---------------------------------------------------------------------------------------------
-
sub clear_magnets
{
--- 1542,1545 ----
***************
*** 1554,1558 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_magnets
{
--- 1559,1562 ----
***************
*** 1573,1577 ****
#
# ---------------------------------------------------------------------------------------------
-
sub create_magnet
{
--- 1577,1580 ----
***************
*** 1590,1594 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_magnet_types
{
--- 1593,1596 ----
***************
*** 1610,1614 ****
#
# ---------------------------------------------------------------------------------------------
-
sub delete_magnet
{
--- 1612,1615 ----
***************
*** 1627,1631 ****
#
# ---------------------------------------------------------------------------------------------
-
sub get_stopword_list
{
--- 1628,1631 ----
***************
*** 1646,1650 ****
#
# ---------------------------------------------------------------------------------------------
-
sub add_stopword
{
--- 1646,1649 ----
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.132
retrieving revision 1.133
diff -C2 -d -r1.132 -r1.133
*** MailParse.pm 9 Jun 2003 18:33:36 -0000 1.132
--- MailParse.pm 14 Jun 2003 21:10:12 -0000 1.133
***************
*** 75,82 ****
# This is a mapping between HTML color names and HTML hexadecimal color values used by the
# map_color value to get canonical color values
- #
- # TODO: expand this table to be more complete
! $self->{color_map__} = { 'white', 'ffffff', 'black', '000000', 'red', 'ff0000', 'green', '00ff00', 'blue', '0000ff' };
$self->{content_type__} = '';
--- 75,104 ----
# This is a mapping between HTML color names and HTML hexadecimal color values used by the
# map_color value to get canonical color values
! $self->{color_map__} = { 'aliceblue','f0f8ff', 'antiquewhite','faebd7', 'aqua','00ffff', 'aquamarine','7fffd4', 'azure','f0ffff',
! 'beige','f5f5dc', 'bisque','ffe4c4', 'black','000000', 'blanchedalmond','ffebcd', 'blue','0000ff', 'blueviolet','8a2be2',
! 'brown','a52a2a', 'burlywood','deb887', 'cadetblue','5f9ea0', 'chartreuse','7fff00', 'chocolate','d2691e', 'coral','ff7f50',
! 'cornflowerblue','6495ed', 'cornsilk','fff8dc', 'crimson','dc143c', 'cyan','00ffff', 'darkblue','00008b', 'darkcyan','008b8b',
! 'darkgoldenrod','b8860b', 'darkgray','a9a9a9', 'darkgreen','006400', 'darkkhaki','bdb76b', 'darkmagenta','8b008b', 'darkolivegreen','556b2f',
! 'darkorange','ff8c00', 'darkorchid','9932cc', 'darkred','8b0000', 'darksalmon','e9967a', 'darkseagreen','8fbc8f', 'darkslateblue','483d8b',
! 'darkturquoise','00ced1', 'darkviolet','9400d3', 'deeppink','ff1493', 'deepskyblue','00bfff', 'deepskyblue','2f4f4f', 'dimgray','696969',
! 'dodgerblue','1e90ff', 'firebrick','b22222', 'floralwhite','fffaf0', 'forestgreen','228b22', 'fuchsia','ff00ff', 'gainsboro','dcdcdc',
! 'ghostwhite','f8f8ff', 'gold','ffd700', 'goldenrod','daa520', 'gray','808080', 'green','008000', 'greenyellow','adff2f',
! 'honeydew','f0fff0', 'hotpink','ff69b4', 'indianred','cd5c5c', 'indigo','4b0082', 'ivory','fffff0', 'khaki','f0e68c',
! 'lavender','e6e6fa', 'lavenderblush','fff0f5', 'lawngreen','7cfc00', 'lemonchiffon','fffacd', 'lightblue','add8e6',
! 'lightcoral','f08080', 'lightcyan','e0ffff', 'lightgoldenrodyellow','fafad2', 'lightgreen','90ee90', 'lightgrey','d3d3d3',
! 'lightpink','ffb6c1', 'lightsalmon','ffa07a', 'lightseagreen','20b2aa', 'lightskyblue','87cefa', 'lightslategray','778899',
! 'lightsteelblue','b0c4de', 'lightyellow','ffffe0', 'lime','00ff00', 'limegreen','32cd32', 'linen','faf0e6', 'magenta','ff00ff',
! 'maroon','800000', 'mediumaquamarine','66cdaa', 'mediumblue','0000cd', 'mediumorchid','ba55d3', 'mediumpurple','9370db',
! 'mediumseagreen','3cb371', 'mediumslateblue','7b68ee', 'mediumspringgreen','00fa9a', 'mediumturquoise','48d1cc',
! 'mediumvioletred','c71585', 'midnightblue','191970', 'mintcream','f5fffa', 'mistyrose','ffe4e1', 'moccasin','ffe4b5',
! 'navajowhite','ffdead', 'navy','000080', 'oldlace','fdf5e6', 'olive','808000', 'olivedrab','6b8e23', 'orange','ffa500',
! 'orangered','ff4500', 'orchid','da70d6', 'palegoldenrod','eee8aa', 'palegreen','98fb98', 'paleturquoise','afeeee',
! 'palevioletred','db7093', 'papayawhip','ffefd5', 'peachpuff','ffdab9', 'peru','cd853f', 'pink','ffc0cb', 'plum','dda0dd',
! 'powderblue','b0e0e6', 'purple','800080', 'red','ff0000', 'rosybrown','bc8f8f', 'royalblue','4169e1', 'saddlebrown','8b4513',
! 'salmon','fa8072', 'sandybrown','f4a460', 'seagreen','2e8b57', 'seashell','fff5ee', 'sienna','a0522d', 'silver','c0c0c0',
! 'skyblue','87ceeb', 'slateblue','6a5acd', 'slategray','708090', 'snow','fffafa', 'springgreen','00ff7f', 'steelblue','4682b4',
! 'tan','d2b48c', 'teal','008080', 'thistle','d8bfd8', 'tomato','ff6347', 'turquoise','40e0d0', 'violet','ee82ee', 'wheat','f5deb3',
! 'white','ffffff', 'whitesmoke','f5f5f5', 'yellow','ffff00', 'yellowgreen','9acd32' };
$self->{content_type__} = '';
|
|
From: <jgr...@us...> - 2003-06-14 21:10:15
|
Update of /cvsroot/popfile/engine
In directory sc8-pr-cvs1:/tmp/cvs-serv29263
Modified Files:
bayes.pl insert.pl popfile.pl stopwords
Log Message:
Added new message queuing engine for asynchronous message passing, use it for classification data and UI registrations, remove mcount and ecount global variables, add new access to all configuration options on Advanced page
Index: bayes.pl
===================================================================
RCS file: /cvsroot/popfile/engine/bayes.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** bayes.pl 18 Feb 2003 14:50:10 -0000 1.15
--- bayes.pl 14 Jun 2003 21:10:12 -0000 1.16
***************
*** 16,24 ****
{
my $b = new Classifier::Bayes;
!
if ( $b->initialize() == 0 ) {
die "Failed to start while initializing the classifier module";
}
!
$b->{debug} = 1;
$b->{parser}->{debug} = 0;
--- 16,24 ----
{
my $b = new Classifier::Bayes;
!
if ( $b->initialize() == 0 ) {
die "Failed to start while initializing the classifier module";
}
!
$b->{debug} = 1;
$b->{parser}->{debug} = 0;
***************
*** 30,34 ****
print "$file is '" . $b->classify_file($file) . "'\n";
}
!
foreach my $word (keys %{$b->{parser}->{words}}) {
print "$word $b->{parser}->{words}{$word}\n";
--- 30,34 ----
print "$file is '" . $b->classify_file($file) . "'\n";
}
!
foreach my $word (keys %{$b->{parser}->{words}}) {
print "$word $b->{parser}->{words}{$word}\n";
***************
*** 40,42 ****
print "Usage: bayes.pl <messages>\n";
print " <messages> Filename of message(s) to classify\n";
! }
\ No newline at end of file
--- 40,42 ----
print "Usage: bayes.pl <messages>\n";
print " <messages> Filename of message(s) to classify\n";
! }
Index: insert.pl
===================================================================
RCS file: /cvsroot/popfile/engine/insert.pl,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** insert.pl 22 Jan 2003 18:32:23 -0000 1.20
--- insert.pl 14 Jun 2003 21:10:12 -0000 1.21
***************
*** 26,30 ****
{
my ($bucket) = @_;
!
# Make sure that the bucket mentioned exists, if it doesn't the create an empty
# directory and word table
--- 26,30 ----
{
my ($bucket) = @_;
!
# Make sure that the bucket mentioned exists, if it doesn't the create an empty
# directory and word table
***************
*** 32,42 ****
mkdir("corpus");
mkdir("corpus/$bucket");
!
print "Loading word table for bucket '$bucket'...\n";
!
open WORDS, "<corpus/$bucket/table";
!
# Each line in the word table is a word and a count
!
while (<WORDS>) {
if ( /__CORPUS__ __VERSION__ (\d+)/ ) {
--- 32,42 ----
mkdir("corpus");
mkdir("corpus/$bucket");
!
print "Loading word table for bucket '$bucket'...\n";
!
open WORDS, "<corpus/$bucket/table";
!
# Each line in the word table is a word and a count
!
while (<WORDS>) {
if ( /__CORPUS__ __VERSION__ (\d+)/ ) {
***************
*** 45,57 ****
return;
}
!
next;
}
!
if ( /(.+) (.+)/ ) {
$words{$1} = $2;
}
}
!
close WORDS;
}
--- 45,57 ----
return;
}
!
next;
}
!
if ( /(.+) (.+)/ ) {
$words{$1} = $2;
}
}
!
close WORDS;
}
***************
*** 72,85 ****
print "Saving word table for bucket '$bucket'...\n";
!
open WORDS, ">corpus/$bucket/table";
print WORDS "__CORPUS__ __VERSION__ 1\n";
!
# Each line in the word table is a word and a count
!
foreach my $word (keys %words) {
print WORDS "$word $words{$word}\n";
}
!
close WORDS;
}
--- 72,85 ----
print "Saving word table for bucket '$bucket'...\n";
!
open WORDS, ">corpus/$bucket/table";
print WORDS "__CORPUS__ __VERSION__ 1\n";
!
# Each line in the word table is a word and a count
!
foreach my $word (keys %words) {
print WORDS "$word $words{$word}\n";
}
!
close WORDS;
}
***************
*** 104,110 ****
$parser->parse_stream($message);
!
! foreach $word (keys %{$parser->{words}}) {
! $words{$word} += $parser->{words}{$word};
}
}
--- 104,110 ----
$parser->parse_stream($message);
!
! foreach $word (keys %{$parser->{words__}}) {
! $words{$word} += $parser->{words__}{$word};
}
}
***************
*** 112,116 ****
# main
! if ( $#ARGV >= 1 )
{
load_word_table($ARGV[0]);
--- 112,116 ----
# main
! if ( $#ARGV >= 1 )
{
load_word_table($ARGV[0]);
***************
*** 123,133 ****
@files = map { glob } @ARGV[1 .. $#ARGV];
}
!
foreach my $file (@files) {
split_mail_message($file);
}
!
save_word_table($ARGV[0]);
!
print "done.\n";
} else {
--- 123,133 ----
@files = map { glob } @ARGV[1 .. $#ARGV];
}
!
foreach my $file (@files) {
split_mail_message($file);
}
!
save_word_table($ARGV[0]);
!
print "done.\n";
} else {
***************
*** 136,138 ****
print " <bucket> The name of the bucket\n";
print " <messages> Filename of message(s) to insert\n";
! }
\ No newline at end of file
--- 136,138 ----
print " <bucket> The name of the bucket\n";
print " <messages> Filename of message(s) to insert\n";
! }
Index: popfile.pl
===================================================================
RCS file: /cvsroot/popfile/engine/popfile.pl,v
retrieving revision 1.210
retrieving revision 1.211
diff -C2 -d -r1.210 -r1.211
*** popfile.pl 30 May 2003 19:39:17 -0000 1.210
--- popfile.pl 14 Jun 2003 21:10:12 -0000 1.211
***************
*** 91,96 ****
}
-
-
# ---------------------------------------------------------------------------------------------
#
--- 91,94 ----
***************
*** 236,240 ****
#
! my ( $major_version, $minor_version, $build_version ) = ( 0, 19, 0 );
my $version_string = "v$major_version.$minor_version.$build_version";
--- 234,238 ----
#
! my ( $major_version, $minor_version, $build_version ) = ( 0, 20, 0 );
my $version_string = "v$major_version.$minor_version.$build_version";
***************
*** 253,256 ****
--- 251,259 ----
$SIG{CHLD} = $on_windows?'IGNORE':\&reaper;
+ # I've seen spurious ALRM signals happen on Windows so here we for safety
+ # say that we want to ignore them
+
+ $SIG{ALRM} = 'IGNORE';
+
# Create the main objects that form the core of POPFile. Consists of the configuration
# modules, the classifier, the UI (currently HTML based), and the POP3 proxy.
***************
*** 289,307 ****
$components{$type}{$name}->configuration( $components{core}{config} );
$components{$type}{$name}->logger( $components{core}{logger} ) if ( $name ne 'logger' );
}
}
! # All proxies need access to the classifier and the interface
!
! foreach my $name (keys %{$components{proxy}}) {
! $components{proxy}{$name}->classifier( $components{classifier}{bayes} );
! $components{proxy}{$name}->ui( $components{interface}{html} );
! }
!
! # All interface components need access to the classifier and the UI
foreach my $name (keys %{$components{interface}}) {
$components{interface}{$name}->classifier( $components{classifier}{bayes} );
! $components{interface}{$name}->ui( $components{interface}{html} ) if ( $name ne 'html' );
}
--- 292,307 ----
$components{$type}{$name}->configuration( $components{core}{config} );
$components{$type}{$name}->logger( $components{core}{logger} ) if ( $name ne 'logger' );
+ $components{$type}{$name}->mq( $components{core}{mq} );
}
}
! # All interface components need access to the classifier
foreach my $name (keys %{$components{interface}}) {
$components{interface}{$name}->classifier( $components{classifier}{bayes} );
! }
!
! foreach my $name (keys %{$components{proxy}}) {
! $components{proxy}{$name}->classifier( $components{classifier}{bayes} );
}
***************
*** 399,410 ****
}
! print "\n\n Saving configuration\n";
! flush STDOUT;
!
! # Write the final configuration to disk
!
! $components{core}{config}->save_configuration();
!
! print "\nPOPFile Engine $version_string terminated\n";
# ---------------------------------------------------------------------------------------------
--- 399,403 ----
}
! print "\n\nPOPFile Engine $version_string terminated\n";
# ---------------------------------------------------------------------------------------------
Index: stopwords
===================================================================
RCS file: /cvsroot/popfile/engine/stopwords,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** stopwords 7 Apr 2003 18:01:41 -0000 1.1
--- stopwords 14 Jun 2003 21:10:12 -0000 1.2
***************
*** 1,11 ****
- you
strike
date
- form
textflow
him
pdt
- code
also
acronym
pst
--- 1,11 ----
strike
+ you
date
textflow
+ form
him
pdt
also
+ code
acronym
pst
***************
*** 14,23 ****
cgi
charset
- est
nbsp
sun
your
- title
but
and
multicol
--- 14,23 ----
cgi
charset
nbsp
+ est
sun
your
but
+ title
and
multicol
***************
*** 30,38 ****
being
dir
- jan
she
color
- have
will
received
going
--- 30,38 ----
being
dir
she
+ jan
color
will
+ have
received
going
***************
*** 40,50 ****
htm
edt
- height
- mbox
can
! iframe
dfn
! com
were
would
off
--- 40,50 ----
htm
edt
can
! mbox
! height
dfn
! iframe
were
+ com
would
off
***************
*** 67,87 ****
aug
overlay
- www
div
status
doing
tue
person
- mon
- cellspacing
his
! helo
select
esmtp
alt
- wbr
- message
- border
note
big
thu
--- 67,87 ----
aug
overlay
div
+ www
status
doing
tue
person
his
! cellspacing
! mon
select
+ helo
esmtp
alt
note
+ border
+ message
+ wbr
big
thu
***************
*** 126,165 ****
body
nobr
- html
bgcolor
from
var
- oct
her
banner
del
- blockquote
math
! any
path
spot
- cdt
textarea
! embed
the
done
yet
it's
- net
font
! thead
blink
plaintext
- went
could
does
param
- this
jul
org
- mar
- src
- mailto
for
cst
kbd
--- 126,165 ----
body
nobr
bgcolor
+ html
from
var
her
+ oct
banner
del
math
! blockquote
path
+ any
spot
textarea
! cdt
the
+ embed
done
yet
it's
font
! net
blink
+ thead
plaintext
could
+ went
does
param
jul
+ this
org
for
+ mailto
+ src
+ mar
cst
kbd
***************
*** 172,183 ****
helvetica
samp
- col
- tab
been
fig
mail
cite
- had
link
script
menu
--- 172,183 ----
helvetica
samp
been
+ tab
+ col
fig
mail
cite
link
+ had
script
menu
***************
*** 187,193 ****
ins
sep
- sub
was
! sat
frameset
apr
--- 187,193 ----
ins
sep
was
! sub
frameset
+ sat
apr
|
|
From: <xue...@us...> - 2003-06-14 19:39:23
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv17595
Modified Files:
installer.nsi
Log Message:
Improved the progress reporting performed by the installer and uninstaller.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.63
retrieving revision 1.64
diff -C2 -d -r1.63 -r1.64
*** installer.nsi 14 Jun 2003 17:22:47 -0000 1.63
--- installer.nsi 14 Jun 2003 19:39:20 -0000 1.64
***************
*** 542,545 ****
--- 542,546 ----
StrCmp ${L_OLD_GUI} "" try_other_port
+ DetailPrint "Shutting down previous version of POPFile..."
NSISdl::download_quiet http://127.0.0.1:${L_OLD_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT}
***************
*** 552,555 ****
--- 553,557 ----
StrCmp ${L_NEW_GUI} "" exit_now
+ DetailPrint "Shutting down previous version of POPFile..."
NSISdl::download_quiet http://127.0.0.1:${L_NEW_GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_RESULT} ; Ignore the result
***************
*** 882,890 ****
; value of 1 is found, we need to look for its OE email account data in
;
! ; HK_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts
;
; otherwise we look in the GUID's entry in HKEY_CURRENT_USER\Identities, using the path
;
! ; HK_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Internet Account Manager\Accounts
; All of the OE account data for an identity appears "under" the path defined
--- 884,892 ----
; value of 1 is found, we need to look for its OE email account data in
;
! ; HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts
;
; otherwise we look in the GUID's entry in HKEY_CURRENT_USER\Identities, using the path
;
! ; HKEY_CURRENT_USER\Identities\{GUID}\Software\Microsoft\Internet Account Manager\Accounts
; All of the OE account data for an identity appears "under" the path defined
***************
*** 1104,1108 ****
!insertmacro MUI_HEADER_TEXT "POPFile is now ready for use" \
! "POPFile and its User Interface can be started now, if required"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioC.ini"
--- 1106,1110 ----
!insertmacro MUI_HEADER_TEXT "POPFile is now ready for use" \
! "The POPFile User Interface only works if POPFile has been started"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioC.ini"
***************
*** 1156,1160 ****
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "DOS-box"
! Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
; Before starting the newly installed POPFile, ensure that no other version of POPFile
--- 1158,1162 ----
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "DOS-box"
! Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile." "This may take a few seconds..."
; Before starting the newly installed POPFile, ensure that no other version of POPFile
***************
*** 1175,1179 ****
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "background"
! Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
; Before starting the newly installed POPFile, ensure that no other version of POPFile
--- 1177,1181 ----
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "background"
! Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile." "This may take a few seconds..."
; Before starting the newly installed POPFile, ensure that no other version of POPFile
***************
*** 1526,1529 ****
--- 1528,1532 ----
directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)" IDYES skip_confirmation
Abort "Uninstall aborted by user"
+
skip_confirmation:
***************
*** 1554,1557 ****
--- 1557,1561 ----
Pop ${GUI}
StrCmp ${GUI} "" skip_shutdown
+ DetailPrint "Shutting down POPFile..."
NSISdl::download_quiet http://127.0.0.1:${GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
Pop ${L_TEMP}
***************
*** 1578,1583 ****
--- 1582,1589 ----
; Read the registry settings found in popfile.reg and restore them
; it there are any. All are assumed to be in HKCU
+
FileOpen ${CFG} $INSTDIR\popfile.reg r
IfErrors skip_registry_restore
+
restore_loop:
FileRead ${CFG} ${L_REG_KEY}
***************
*** 1597,1600 ****
--- 1603,1607 ----
IfErrors skip_registry_restore
WriteRegStr HKCU ${L_REG_KEY} ${L_REG_SUBKEY} ${L_REG_VALUE}
+ DetailPrint "Restored ${L_REG_SUBKEY}: ${L_REG_VALUE}"
goto restore_loop
***************
*** 1672,1682 ****
--- 1679,1692 ----
; if $INSTDIR was removed, skip these next ones
+
IfFileExists $INSTDIR 0 Removed
MessageBox MB_YESNO|MB_ICONQUESTION \
"Do you want to remove all files in your POPFile directory? (If you have anything \
you created that you want to keep, click No)" IDNO Removed
+ DetailPrint "Removing all files from POPFile directory"
Delete $INSTDIR\*.* ; this would be skipped if the user hits no
RMDir /r $INSTDIR
IfFileExists $INSTDIR 0 Removed
+ DetailPrint "Note: unable to remove all files from POPFile directory"
MessageBox MB_OK|MB_ICONEXCLAMATION \
"Note: $INSTDIR could not be removed."
|
|
From: <xue...@us...> - 2003-06-14 17:22:50
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv29347
Modified Files:
installer.nsi ioC.ini
Log Message:
A more elegant way to handle the display of the POPFile User Interface.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** installer.nsi 14 Jun 2003 12:18:29 -0000 1.62
--- installer.nsi 14 Jun 2003 17:22:47 -0000 1.63
***************
*** 82,85 ****
--- 82,98 ----
;-----------------------------------------
+ ; General Settings - Finish Page Settings
+ ;-----------------------------------------
+
+ ; Offer to display the POPFile User Interface (The 'CheckRunStatus' function ensures this
+ ; option is only offered if the installer has started POPFile running)
+
+ !define MUI_FINISHPAGE_SHOWREADME "http://127.0.0.1:${GUI}/"
+
+ ; Allow user to check the log file (by clicking "Show Details" button on the "Install" page)
+
+ # !define MUI_FINISHPAGE_NOAUTOCLOSE
+
+ ;-----------------------------------------
; General Settings - Other Settings
;-----------------------------------------
***************
*** 115,118 ****
--- 128,136 ----
!define MUI_CUSTOMFUNCTION_DIRECTORY_LEAVE CheckExistingConfig
+ ; Use a "pre" function for the 'Finish' page to ensure installer only offers to display
+ ; POPFile User Interface if user has chosen to start POPFile from the installer.
+
+ !define MUI_CUSTOMFUNCTION_FINISH_PRE CheckRunStatus
+
#--------------------------------------------------------------------------
# User Registers (Global)
***************
*** 139,142 ****
--- 157,163 ----
It is recommended that you close all other applications before starting Setup.\r\n\r\n"
+ !insertmacro MUI_LANGUAGEFILE_STRING MUI_TEXT_FINISH_SHOWREADME \
+ "Display the POPFile User Interface"
+
!insertmacro MUI_LANGUAGE "English"
***************
*** 1075,1083 ****
# Installer Function: StartPOPFilePage (generates a custom page)
#
! # This function offers to start the newly installed POPFile and also offers to display the
! # POPFile User Interface.
#
! # A "leave" function (CheckLaunchOptions) is used to validate and act upon the selections
! # made by the user.
#--------------------------------------------------------------------------
--- 1096,1102 ----
# Installer Function: StartPOPFilePage (generates a custom page)
#
! # This function offers to start the newly installed POPFile.
#
! # A "leave" function (CheckLaunchOptions) is used to act upon the selections made by the user.
#--------------------------------------------------------------------------
***************
*** 1095,1101 ****
# (the "leave" function for the custom page created by "StartPOPFilePage")
#
! # This function is used to validate the start POPFile options selected by the user.
! # If the selections are not valid, user is asked to make an alternative selection,
! # otherwise this function will perform the selected actions.
#--------------------------------------------------------------------------
--- 1114,1120 ----
# (the "leave" function for the custom page created by "StartPOPFilePage")
#
! # This function is used to action the "start POPFile" options selected by the user.
! # The user is allowed to return to this page and change their selections, so the
! # previous state is stored in the INI file used for this custom page.
#--------------------------------------------------------------------------
***************
*** 1103,1139 ****
!define L_RESULT $R9
! !define L_SHOWUI $R8
! !define L_TEMP $R7
Push ${L_RESULT}
- Push ${L_SHOWUI}
Push ${L_TEMP}
! ; Field 2 = 'Do not run POPFile' radio button, field 5 = 'Display UI' checkbox
!insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 2" "State"
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_SHOWUI} "ioC.ini" "Field 5" "State"
! StrCmp ${L_SHOWUI} "0" selection_ok
! StrCmp ${L_TEMP} "0" selection_ok
! MessageBox MB_OK "Sorry, the POPFile User Interface only works when POPFile is running !\
! $\r$\n$\r$\n\
! If you wish to display the User Interface, you must also select one of the 'Run POPFile'\
! options."
! ; Stay with the custom page created by "StartPOPFilePage"
! Pop ${L_TEMP}
! Pop ${L_SHOWUI}
! Pop ${L_RESULT}
! Abort
! selection_ok:
! ; If user does not want to start POPFIle now, there is nothing left to do here
- StrCmp ${L_TEMP} "1" exit_without_banner
-
Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
--- 1122,1159 ----
!define L_RESULT $R9
! !define L_TEMP $R8
Push ${L_RESULT}
Push ${L_TEMP}
! ; Field 2 = 'Do not run POPFile' radio button
!insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 2" "State"
! StrCmp ${L_TEMP} "0" run_popfile
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Run Status" "LastAction"
! StrCmp ${L_TEMP} "" exit_without_banner
! StrCmp ${L_TEMP} "no" exit_without_banner
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "no"
! ; User has changed their mind: Shutdown the newly installed version of POPFile
! NSISdl::download_quiet http://127.0.0.1:${GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
! Pop ${L_RESULT} ; Get the return value (and ignore it)
! goto exit_without_banner
! run_popfile:
! ; Field 4 = 'Run POPFile in background' radio button
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 4" "State"
! StrCmp ${L_TEMP} "1" run_in_background
!
! ; Run POPFile in a DOS box
!
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Run Status" "LastAction"
! StrCmp ${L_TEMP} "DOS-box" exit_without_banner
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "DOS-box"
Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
***************
*** 1144,1156 ****
Pop ${L_RESULT} ; Get the return value (and ignore it)
- ; Field 4 = 'Run POPFile in background' radio button
-
- !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 4" "State"
- StrCmp ${L_TEMP} "1" run_in_background
-
- ; Run POPFile in a DOS box
-
ExecShell "open" "$SMPROGRAMS\POPFile\Run POPFile.lnk"
! goto display_ui
run_in_background:
--- 1164,1169 ----
Pop ${L_RESULT} ; Get the return value (and ignore it)
ExecShell "open" "$SMPROGRAMS\POPFile\Run POPFile.lnk"
! goto wait_for_popfile
run_in_background:
***************
*** 1158,1165 ****
; Run POPFile without a DOS box
ExecShell "open" "$SMPROGRAMS\POPFile\Run POPFile in background.lnk"
! display_ui:
! StrCmp ${L_SHOWUI} "0" exit_now
; Wait until POPFile is ready to display the UI (may take a second or so)
--- 1171,1189 ----
; Run POPFile without a DOS box
+ !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Run Status" "LastAction"
+ StrCmp ${L_TEMP} "background" exit_without_banner
+ !insertmacro MUI_INSTALLOPTIONS_WRITE "ioC.ini" "Run Status" "LastAction" "background"
+
+ Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
+
+ ; Before starting the newly installed POPFile, ensure that no other version of POPFile
+ ; is running on the same UI port as the newly installed version.
+
+ NSISdl::download_quiet http://127.0.0.1:${GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
+ Pop ${L_RESULT} ; Get the return value (and ignore it)
+
ExecShell "open" "$SMPROGRAMS\POPFile\Run POPFile in background.lnk"
! wait_for_popfile:
; Wait until POPFile is ready to display the UI (may take a second or so)
***************
*** 1170,1194 ****
NSISdl::download_quiet http://127.0.0.1:${GUI} "$PLUGINSDIR\ui.htm"
Pop ${L_RESULT} ; Did POPFile return an HTML page?
! StrCmp ${L_RESULT} "success" launch_browser
Sleep 250 ; milliseconds
IntOp ${L_TEMP} ${L_TEMP} - 1
! IntCmp ${L_TEMP} 0 launch_browser launch_browser check_if_ready
!
! launch_browser:
! ExecShell "open" "http://127.0.0.1:${GUI}/"
! exit_now:
Banner::destroy
-
- exit_without_banner:
! ; Allow next page in the installation sequence to be shown
Pop ${L_TEMP}
- Pop ${L_SHOWUI}
Pop ${L_RESULT}
!undef L_RESULT
! !undef L_SHOWUI
!undef L_TEMP
--- 1194,1247 ----
NSISdl::download_quiet http://127.0.0.1:${GUI} "$PLUGINSDIR\ui.htm"
Pop ${L_RESULT} ; Did POPFile return an HTML page?
! StrCmp ${L_RESULT} "success" remove_banner
Sleep 250 ; milliseconds
IntOp ${L_TEMP} ${L_TEMP} - 1
! IntCmp ${L_TEMP} 0 remove_banner remove_banner check_if_ready
! remove_banner:
Banner::destroy
! exit_without_banner:
Pop ${L_TEMP}
Pop ${L_RESULT}
!undef L_RESULT
! !undef L_TEMP
!
! FunctionEnd
!
! #--------------------------------------------------------------------------
! # Installer Function: CheckRunStatus
! # (the "pre" function for the 'Finish' page)
! #
! # The 'Finish' page contains a single CheckBox to control whether or not the installer
! # starts the POPFile User Interface. The User Interface only works when POPFile is running,
! # so we must ensure this CheckBox can only be ticked if the installer has started POPFile.
! #--------------------------------------------------------------------------
!
! Function CheckRunStatus
!
! !define L_TEMP $R9
!
! Push ${L_TEMP}
!
! ; Field 4 is the 'ReadMe' CheckBox on the 'Finish' page (assuming there is no 'Run' CheckBox)
!
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" ""
!
! ; Get the status of the 'Do not run POPFile' radio button on the previous page of installer
!
! !insertmacro MUI_INSTALLOPTIONS_READ ${L_TEMP} "ioC.ini" "Field 2" "State"
! StrCmp ${L_TEMP} "0" selection_ok
!
! ; User has not started POPFile so we cannot offer to display the POPFile User Interface
!
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "0"
! !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Flags" "DISABLED"
!
! selection_ok:
! Pop ${L_TEMP}
!
!undef L_TEMP
***************
*** 1386,1390 ****
FunctionEnd
! !macroend
#--------------------------------------------------------------------------
--- 1439,1443 ----
FunctionEnd
! !macroend
#--------------------------------------------------------------------------
***************
*** 1468,1472 ****
!define L_REG_VALUE $R7
!define L_TEMP $R8
!
IfFileExists $INSTDIR\popfile.pl skip_confirmation
MessageBox MB_YESNO "It does not appear that POPFile is installed in the \
--- 1521,1525 ----
!define L_REG_VALUE $R7
!define L_TEMP $R8
!
IfFileExists $INSTDIR\popfile.pl skip_confirmation
MessageBox MB_YESNO "It does not appear that POPFile is installed in the \
Index: ioC.ini
===================================================================
RCS file: /cvsroot/popfile/windows/ioC.ini,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ioC.ini 12 Jun 2003 15:02:32 -0000 1.1
--- ioC.ini 14 Jun 2003 17:22:47 -0000 1.2
***************
*** 11,15 ****
[Settings]
! NumFields=7
BackEnabled=0
CancelEnabled=0
--- 11,15 ----
[Settings]
! NumFields=6
BackEnabled=0
CancelEnabled=0
***************
*** 21,25 ****
Right=-10
Top=0
! Bottom=75
[Field 2]
--- 21,25 ----
Right=-10
Top=0
! Bottom=60
[Field 2]
***************
*** 50,77 ****
[Field 5]
- Type=CheckBox
- Text=Display the POPFile User Interface (only if POPFile is running)
- Left=30
- Right=-30
- Top=57
- Bottom=67
- Flags=Group
- State=1
-
- [Field 6]
Type=GroupBox
Text=
Left=10
Right=-10
! Top=80
! Bottom=140
! [Field 7]
Type=Label
! Text=Once POPFile has been started, you can display the POPFile User Interface by\r\n\r\n(a) double-clicking the POPFile icon in the system tray, or\r\n\r\n(b) using Start --> Programs --> POPFile --> POPFile User Interface.
Left=15
Right=-15
! Top=90
! Bottom=135
#--------------------
--- 50,67 ----
[Field 5]
Type=GroupBox
Text=
Left=10
Right=-10
! Top=75
! Bottom=135
! [Field 6]
Type=Label
! Text=Once POPFile has been started, you can display the POPFile User Interface by\r\n\r\n(a) double-clicking the POPFile icon in the system tray, OR\r\n\r\n(b) using Start --> Programs --> POPFile --> POPFile User Interface.
Left=15
Right=-15
! Top=85
! Bottom=130
#--------------------
|
|
From: <xue...@us...> - 2003-06-14 12:18:35
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv24606
Modified Files:
installer.nsi
Log Message:
Handle read-only popfile.cfg and use explicit path when changing file attributes.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** installer.nsi 12 Jun 2003 20:48:51 -0000 1.61
--- installer.nsi 14 Jun 2003 12:18:29 -0000 1.62
***************
*** 271,275 ****
$\r$\nOK to overwrite this file?$\r$\n$\r$\n\
Click 'Yes' to overwrite, click 'No' to skip updating this file" IDNO stopwords_done
! SetFileAttributes stopwords.default NORMAL
use_other_name:
--- 271,275 ----
$\r$\nOK to overwrite this file?$\r$\n$\r$\n\
Click 'Yes' to overwrite, click 'No' to skip updating this file" IDNO stopwords_done
! SetFileAttributes "$INSTDIR\stopwords.default" NORMAL
use_other_name:
***************
*** 283,291 ****
FileClose ${CFG}
IfFileExists "$INSTDIR\popfile.cfg" 0 update_config
IfFileExists "$INSTDIR\popfile.cfg.bak" 0 make_cfg_backup
MessageBox MB_YESNO "Backup copy of 'popfile.cfg' already exists ('popfile.cfg.bak').$\r$\n\
$\r$\nOK to overwrite this file?$\r$\n$\r$\n\
Click 'Yes' to overwrite, click 'No' to skip making a backup copy" IDNO update_config
! SetFileAttributes popfile.cfg.bak NORMAL
make_cfg_backup:
--- 283,292 ----
FileClose ${CFG}
IfFileExists "$INSTDIR\popfile.cfg" 0 update_config
+ SetFileAttributes "$INSTDIR\popfile.cfg" NORMAL
IfFileExists "$INSTDIR\popfile.cfg.bak" 0 make_cfg_backup
MessageBox MB_YESNO "Backup copy of 'popfile.cfg' already exists ('popfile.cfg.bak').$\r$\n\
$\r$\nOK to overwrite this file?$\r$\n$\r$\n\
Click 'Yes' to overwrite, click 'No' to skip making a backup copy" IDNO update_config
! SetFileAttributes "$INSTDIR\popfile.cfg.bak" NORMAL
make_cfg_backup:
|
|
From: <xue...@us...> - 2003-06-13 10:03:43
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1:/tmp/cvs-serv16234 Modified Files: ioA.ini Log Message: Updated to relfect the latest improvements to the installer. Index: ioA.ini =================================================================== RCS file: /cvsroot/popfile/windows/ioA.ini,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ioA.ini 22 Apr 2003 21:45:27 -0000 1.9 --- ioA.ini 13 Jun 2003 10:03:36 -0000 1.10 *************** *** 63,67 **** [Field 7] Type=label ! Text=IF UPGRADING POPFILE --- PLEASE SHUTDOWN POPFILE BEFORE PROCEEDING Left=7 Right=-7 --- 63,67 ---- [Field 7] Type=label ! Text=IF UPGRADING POPFILE --- INSTALLER WILL SHUTDOWN THE EXISTING VERSION Left=7 Right=-7 |
|
From: <xue...@us...> - 2003-06-12 20:48:57
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv3809
Modified Files:
installer.nsi
Log Message:
Display a banner while waiting for POPFile to start.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** installer.nsi 12 Jun 2003 17:12:13 -0000 1.60
--- installer.nsi 12 Jun 2003 20:48:51 -0000 1.61
***************
*** 1133,1137 ****
; If user does not want to start POPFIle now, there is nothing left to do here
! StrCmp ${L_TEMP} "1" exit_now
; Before starting the newly installed POPFile, ensure that no other version of POPFile
--- 1133,1139 ----
; If user does not want to start POPFIle now, there is nothing left to do here
! StrCmp ${L_TEMP} "1" exit_without_banner
!
! Banner::show /NOUNLOAD /set 76 "Preparing to start POPFile now." "Please be patient..."
; Before starting the newly installed POPFile, ensure that no other version of POPFile
***************
*** 1176,1179 ****
--- 1178,1184 ----
exit_now:
+ Banner::destroy
+
+ exit_without_banner:
; Allow next page in the installation sequence to be shown
|
|
From: <xue...@us...> - 2003-06-12 17:12:17
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv32698
Modified Files:
installer.nsi
Log Message:
Uninstaller now shuts down POPFile before uninstalling it.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** installer.nsi 12 Jun 2003 15:04:48 -0000 1.59
--- installer.nsi 12 Jun 2003 17:12:13 -0000 1.60
***************
*** 148,151 ****
--- 148,152 ----
OutFile "setup.exe"
+
; Ensure CRC checking cannot be turned off using the command-line switch
***************
*** 629,633 ****
Pop ${L_OLDUI}
! ; Save the UI port settings found in popfile.cfg for later use by the 'MakeItSafe' function
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "NewStyle" "${GUI}"
--- 630,634 ----
Pop ${L_OLDUI}
! ; Save the UI port settings (from popfile.cfg) for later use by the 'MakeItSafe' function
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioA.ini" "UI Port" "NewStyle" "${GUI}"
***************
*** 1313,1320 ****
#--------------------------------------------------------------------------
! # Installer Function: StrCheckDecimal
#
! # Checks that a given string contains only the digits 0 to 9.
! # (if string contains any invalid characters, "" is returned)
#
# Inputs:
--- 1314,1325 ----
#--------------------------------------------------------------------------
! # Macro: StrCheckDecimal
#
! # The installation process and the uninstall process both use a function which checks if
! # a given string contains a decimal number. This macro makes maintenance easier by ensuring
! # that both processes use identical functions, with the only difference being their names.
! #
! # The 'StrCheckDecimal' and 'un.StrCheckDecimal' functions check that a given string contains
! # only the digits 0 to 9. (if the string contains any invalid characters, "" is returned)
#
# Inputs:
***************
*** 1331,1378 ****
#
#--------------------------------------------------------------------------
! Function StrCheckDecimal
! !define DECIMAL_DIGIT "0123456789"
! Exch $0 ; The input string
! Push $1 ; Holds the result: either "" (if input is invalid) or the input string (if valid)
! Push $2 ; A character from the input string
! Push $3 ; The offset to a character in the "validity check" string
! Push $4 ; A character from the "validity check" string
! Push $5 ; Holds the current "validity check" string
! StrCpy $1 ""
! next_input_char:
! StrCpy $2 $0 1 ; Get the next character from the input string
! StrCmp $2 "" done
! StrCpy $5 ${DECIMAL_DIGIT}$2 ; Add it to end of "validity check" to guarantee a match
! StrCpy $0 $0 "" 1
! StrCpy $3 -1
! next_valid_char:
! IntOp $3 $3 + 1
! StrCpy $4 $5 1 $3 ; Extract next "valid" character (from "validity check" string)
! StrCmp $2 $4 0 next_valid_char
! IntCmp $3 10 invalid 0 invalid ; If match is with the char we added, input string is bad
! StrCpy $1 $1$4 ; Add "valid" character to the result
! goto next_input_char
! invalid:
! StrCpy $1 ""
! done:
! StrCpy $0 $1 ; Result is either a string of decimal digits or ""
! Pop $5
! Pop $4
! Pop $3
! Pop $2
! Pop $1
! Exch $0 ; place result on top of the stack
! !undef DECIMAL_DIGIT
! FunctionEnd
#--------------------------------------------------------------------------
--- 1336,1400 ----
#
#--------------------------------------------------------------------------
+ !macro StrCheckDecimal UN
+ Function ${UN}StrCheckDecimal
! !define DECIMAL_DIGIT "0123456789"
! Exch $0 ; The input string
! Push $1 ; Holds the result: either "" (if input is invalid) or the input string (if valid)
! Push $2 ; A character from the input string
! Push $3 ; The offset to a character in the "validity check" string
! Push $4 ; A character from the "validity check" string
! Push $5 ; Holds the current "validity check" string
! StrCpy $1 ""
! next_input_char:
! StrCpy $2 $0 1 ; Get the next character from the input string
! StrCmp $2 "" done
! StrCpy $5 ${DECIMAL_DIGIT}$2 ; Add it to end of "validity check" to guarantee a match
! StrCpy $0 $0 "" 1
! StrCpy $3 -1
! next_valid_char:
! IntOp $3 $3 + 1
! StrCpy $4 $5 1 $3 ; Extract next "valid" character (from "validity check" string)
! StrCmp $2 $4 0 next_valid_char
! IntCmp $3 10 invalid 0 invalid ; If match is with the char we added, input string is bad
! StrCpy $1 $1$4 ; Add "valid" character to the result
! goto next_input_char
! invalid:
! StrCpy $1 ""
! done:
! StrCpy $0 $1 ; Result is either a string of decimal digits or ""
! Pop $5
! Pop $4
! Pop $3
! Pop $2
! Pop $1
! Exch $0 ; place result on top of the stack
! !undef DECIMAL_DIGIT
! FunctionEnd
! !macroend
! #--------------------------------------------------------------------------
! # Installer Function: StrCheckDecimal
! #
! # This function is used during the installation process
! #--------------------------------------------------------------------------
!
! !insertmacro StrCheckDecimal ""
!
! #--------------------------------------------------------------------------
! # Uninstaller Function: un.StrCheckDecimal
! #
! # This function is used during the uninstall process
! #--------------------------------------------------------------------------
!
! !insertmacro StrCheckDecimal "un."
#--------------------------------------------------------------------------
***************
*** 1422,1426 ****
#--------------------------------------------------------------------------
! # Uninstaller Function: unTrimNewlines
#
# This function is used during the uninstall process
--- 1444,1448 ----
#--------------------------------------------------------------------------
! # Uninstaller Function: un.TrimNewlines
#
# This function is used during the uninstall process
***************
*** 1435,1438 ****
--- 1457,1466 ----
Section "Uninstall"
+ !define L_LNE $R4
+ !define L_REG_KEY $R5
+ !define L_REG_SUBKEY $R6
+ !define L_REG_VALUE $R7
+ !define L_TEMP $R8
+
IfFileExists $INSTDIR\popfile.pl skip_confirmation
MessageBox MB_YESNO "It does not appear that POPFile is installed in the \
***************
*** 1441,1444 ****
--- 1469,1502 ----
skip_confirmation:
+ ; Shutdown POPFile before uninstalling it
+
+ ClearErrors
+
+ FileOpen ${CFG} $INSTDIR\popfile.cfg r
+
+ loop:
+ FileRead ${CFG} ${L_LNE}
+ IfErrors done
+
+ StrCpy ${L_TEMP} ${L_LNE} 10
+ StrCmp ${L_TEMP} "html_port " got_html_port
+ Goto loop
+
+ got_html_port:
+ StrCpy ${GUI} ${L_LNE} 5 10
+ Goto loop
+
+ done:
+ FileClose ${CFG}
+
+ Push ${GUI}
+ Call un.TrimNewlines
+ Call un.StrCheckDecimal
+ Pop ${GUI}
+ StrCmp ${GUI} "" skip_shutdown
+ NSISdl::download_quiet http://127.0.0.1:${GUI}/shutdown "$PLUGINSDIR\shutdown.htm"
+ Pop ${L_TEMP}
+
+ skip_shutdown:
Delete $SMPROGRAMS\POPFile\Support\*.url
RMDir $SMPROGRAMS\POPFile\Support
***************
*** 1464,1483 ****
IfErrors skip_registry_restore
restore_loop:
! FileRead ${CFG} $R5
! Push $R5
Call un.TrimNewlines
! Pop $R5
IfErrors skip_registry_restore
! FileRead ${CFG} $R6
! Push $R6
Call un.TrimNewlines
! Pop $R6
IfErrors skip_registry_restore
! FileRead ${CFG} $R7
! Push $R7
Call un.TrimNewlines
! Pop $R7
IfErrors skip_registry_restore
! WriteRegStr HKCU $R5 $R6 $R7
goto restore_loop
--- 1522,1541 ----
IfErrors skip_registry_restore
restore_loop:
! FileRead ${CFG} ${L_REG_KEY}
! Push ${L_REG_KEY}
Call un.TrimNewlines
! Pop ${L_REG_KEY}
IfErrors skip_registry_restore
! FileRead ${CFG} ${L_REG_SUBKEY}
! Push ${L_REG_SUBKEY}
Call un.TrimNewlines
! Pop ${L_REG_SUBKEY}
IfErrors skip_registry_restore
! FileRead ${CFG} ${L_REG_VALUE}
! Push ${L_REG_VALUE}
Call un.TrimNewlines
! Pop ${L_REG_VALUE}
IfErrors skip_registry_restore
! WriteRegStr HKCU ${L_REG_KEY} ${L_REG_SUBKEY} ${L_REG_VALUE}
goto restore_loop
***************
*** 1558,1562 ****
MessageBox MB_YESNO|MB_ICONQUESTION \
"Do you want to remove all files in your POPFile directory? (If you have anything \
! you created that you want to keep, click No)" IDNO Removed
Delete $INSTDIR\*.* ; this would be skipped if the user hits no
RMDir /r $INSTDIR
--- 1616,1620 ----
MessageBox MB_YESNO|MB_ICONQUESTION \
"Do you want to remove all files in your POPFile directory? (If you have anything \
! you created that you want to keep, click No)" IDNO Removed
Delete $INSTDIR\*.* ; this would be skipped if the user hits no
RMDir /r $INSTDIR
***************
*** 1566,1569 ****
--- 1624,1632 ----
Removed:
+ !undef L_LNE
+ !undef L_REG_KEY
+ !undef L_REG_SUBKEY
+ !undef L_REG_VALUE
+ !undef L_TEMP
SectionEnd
|
|
From: <xue...@us...> - 2003-06-12 15:04:52
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv27609
Modified Files:
installer.nsi
Log Message:
Shutdown existing POPFile before overwriting it. Allow user to start POPFile and the UI.
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.58
retrieving revision 1.59
diff -C2 -d -r1.58 -r1.59
*** installer.nsi 9 Jun 2003 18:35:16 -0000 1.58
--- installer.nsi 12 Jun 2003 15:04:48 -0000 1.59
***************
*** 3,8 ****
# installer.nsi --- This is the NSIS script used to create the
# Windows installer for POPFile. This script uses
! # two custom pages whose layouts are defined
! # in the files "ioA.ini" and "ioB.ini".
#
# Copyright (c) 2001-2003 John Graham-Cumming
--- 3,8 ----
# installer.nsi --- This is the NSIS script used to create the
# Windows installer for POPFile. This script uses
! # three custom pages whose layouts are defined
[...1107 lines suppressed...]
--- 1371,1375 ----
Pop $1
Exch $0 ; place result on top of the stack
!
!undef DECIMAL_DIGIT
***************
*** 1224,1228 ****
IntCmp $R1 0 no_trim_needed
StrCpy $R0 $R0 $R1
!
no_trim_needed:
Pop $R2
--- 1405,1409 ----
IntCmp $R1 0 no_trim_needed
StrCpy $R0 $R0 $R1
!
no_trim_needed:
Pop $R2
|
|
From: <xue...@us...> - 2003-06-12 15:02:36
|
Update of /cvsroot/popfile/windows In directory sc8-pr-cvs1:/tmp/cvs-serv25998 Added Files: ioC.ini Log Message: Define custom page used to launch POPFile. --- NEW FILE: ioC.ini --- #------------------------------------------------------------------- # # ioC.ini --- This file is used by "installer.nsi", the NSIS script # used to create the Windows installer for POPFile. # This file defines the layout of the custom page # which offers to start POPFile and the POPFile UI. # # Copyright (c) 2001-2003 John Graham-Cumming # #------------------------------------------------------------------- [Settings] NumFields=7 BackEnabled=0 CancelEnabled=0 [Field 1] Type=GroupBox Text=Start POPFile now ? Left=10 Right=-10 Top=0 Bottom=75 [Field 2] Type=RadioButton Text=No Left=30 Right=-30 Top=12 Bottom=22 Flags=Group [Field 3] Type=RadioButton Text=Run POPFile (in a DOS box) Left=30 Right=-30 Top=27 Bottom=37 [Field 4] Type=RadioButton Text=Run POPFile in background (no DOS box displayed) Left=30 Right=-30 Top=42 Bottom=52 State=1 [Field 5] Type=CheckBox Text=Display the POPFile User Interface (only if POPFile is running) Left=30 Right=-30 Top=57 Bottom=67 Flags=Group State=1 [Field 6] Type=GroupBox Text= Left=10 Right=-10 Top=80 Bottom=140 [Field 7] Type=Label Text=Once POPFile has been started, you can display the POPFile User Interface by\r\n\r\n(a) double-clicking the POPFile icon in the system tray, or\r\n\r\n(b) using Start --> Programs --> POPFile --> POPFile User Interface. Left=15 Right=-15 Top=90 Bottom=135 #-------------------- # End of ioC.ini #-------------------- |
|
From: <jgr...@us...> - 2003-06-11 14:45:19
|
Update of /cvsroot/popfile/engine/languages In directory sc8-pr-cvs1:/tmp/cvs-serv24247 Modified Files: Suomi.msg Added Files: Português.msg Log Message: Updated Finnish translation and added Portugese (Iberian) --- NEW FILE: Português.msg --- # Copyright (c) 2001-2003 John Graham-Cumming # Identify the language and character set used for the interface LanguageCode pt LanguageCharset ISO-8859-1 # This is used to get the appropriate subdirectory for the manual ManualLanguage br # Common words that are used on their own all over the interface Apply Aplicar On Ligado Off Desligado TurnOn Ligar TurnOff Desligar Add Adicionar Remove Remover Previous Anterior Next Seguinte From Originador Subject Assunto Classification Classificação Reclassify Reclassificar Undo Desfazer Close Fechar Find Procurar Filter Filtrar Yes Sim No Não ChangeToYes Alterar para Sim ChangeToNo Alterar para Não Bucket Receptáculo Magnet Íman Delete Apagar Create Criar To Para Total Total Rename Renomear Frequency Frequência Probability Probabilidade Score Pontuação Lookup Procurar # The header and footer that appear on every UI page Header_Title Centro de Controle POPFile Header_Shutdown Desligar POPFile Header_History Histórico Header_Buckets Receptáculos Header_Configuration Configuração Header_Advanced Avançado Header_Security Segurança Header_Magnets Ímans Footer_HomePage POPFile na internet Footer_Manual Manual Footer_Forums Fórums Footer_FeedMe Doações Footer_RequestFeature Pedir uma funcionalidade Footer_MailingList Lista de Email Configuration_Error1 O caracter separador deve ser um único caracter Configuration_Error2 O porta da interface do utilizador deve ser um número entre 1 e 65535 Configuration_Error3 A porta de escuta POP3 deve ser um número entre 1 e 65535 Configuration_Error4 O tamanho da página deve ser um número entre 1 e 1000 Configuration_Error5 O número de dias no histórico deve ser um número entre 1 e 366 Configuration_Error6 O tempo limite TCP deve ser um número entre 10 e 300 Configuration_POP3Port Porta de escuta POP3 Configuration_POP3Update Alterada a porta para %s; esta alteração não terá efeito até que você reinicie o POPFile Configuration_Separator Caracter separador Configuration_SepUpdate Alterado o separador para %s Configuration_UI Porta da interface web de usuário Configuration_UIUpdate Alterada a porta da interface web do utilizador para %s; esta alteração não terá efeito até que você reinicie o POPFile Configuration_History Número de emails por página Configuration_HistoryUpdate Alterado o número de emails por página para %s Configuration_Days Número de dias para manter no histórico Configuration_DaysUpdate Alterado o número de dias para manter no histórico para %s Configuration_UserInterface Interface do Utilizador Configuration_Skins Aspecto Configuration_SkinsChoose Escolha o aspecto Configuration_Language Língua Configuration_LanguageChoose Escolha a língua Configuration_ListenPorts Portas de Escuta Configuration_HistoryView Exibir Histórico Configuration_TCPTimeout Tempo Limite de Conexão TCP Configuration_TCPTimeoutSecs Tempo limite de conexão TCP em segundos Configuration_TCPTimeoutUpdate Alterado o tempo limite de conexão TCP para %s Configuration_ClassificationInsertion Inserção de Classificação Configuration_SubjectLine Modificação do assunto Configuration_XTCInsertion Inserção de X-Text-Classification Configuration_XPLInsertion Inserção de X-POPFile-Link Configuration_Logging Registo de actividade Configuration_None em nenhum lado Configuration_ToScreen no ecrã Configuration_ToFile num ficheiro Configuration_ToScreenFile no ecrãn e num ficheiro Configuration_LoggerOutput Registar actividade Configuration_GeneralSkins Aspecto normal Configuration_SmallSkins Aspecto pequeno Configuration_TinySkins Aspecto minúsculo Advanced_Error1 '%s' já está na lista de palavras ignoradas Advanced_Error2 Palavras ignoradas podem somente conter caracteres alfanuméricos, ., _, -, ou @ Advanced_Error3 '%s' adicionado na lista de palavras ignoradas Advanced_Error4 '%s' não estã na lista de palavras ignoradas Advanced_Error5 '%s' removido da lista de palavras ignoradas Advanced_StopWords Palavras Ignoradas Advanced_Message1 As seguintes palavras são ignoradas de todas as classificações porque ocorrem muito frequentemente. Advanced_AddWord Adicionar palavra Advanced_RemoveWord Remover palavra History_Filter (apenas mostrando o receptáculo <font color="%s">%s</font>) History_FilterBy Filtrar por History_ResetSearch Mostar todos History_Search (procurar pelo assunto %s) History_Title Mensagens Recentes History_Jump Ir para a mensagem History_ShowAll Exibir Tudo History_ShouldBe Deveria ser History_NoFrom sem originador History_NoSubject sem assunto History_ClassifyAs Classificar como History_MagnetUsed Íman usado History_ChangedTo Alterado para <font color="%s">%s History_Already Já reclassificado como <font color="%s">%s</font> History_RemoveAll Remover Tudo History_RemovePage Remover esta Página History_Remove Para remover entradas do histórico use History_SearchMessage Procurar Assunto History_NoMessages Nenhuma mensagem History_ShowMagnet Magnetizado History_Magnet (apenas mostrando mensagens classificadas por íman) Password_Title Senha Password_Enter Digite a senha Password_Go Entrar! Password_Error1 Senha incorreta Security_Error1 A porta segura deve ser um número entre 1 e 65535 Security_Stealth Modo Stealth/Operação Servidor Security_NoStealthMode Não (Modo Stealth) Security_ExplainStats (Com isto ligado o POPFile envia uma vez por dia os seguintes três valores para um script em www.usethesource.com: bc (o número total de receptáculos que você tem), mc (o número total de mensagens que o POPFile classificou) e ec (o número total de erros de classificação). Isto fica guardado num arquivo que eu vou usar para publicar algumas estatísticas sobre como as pessoas usam o POPFile e o quão bem ele funciona. O meu servidor web mantém o seus arquivos de log por mais ou menos 5 dias antes de os apagar; Eu não guardo nenhuma ligação entre as estatístcas e os endereços IP de cada um.) Security_ExplainUpdate (Com isto ligado o POPFile envia uma vez por dia os seguintes três valores para um script em www.usethesource.com: ma (o número maior da versão do seu POPFile), mi (o número menor da versão do seu POPFile) and bn (o número do build da sua versão do POPFile). O POPFile recebe uma resposta na forma de um gráfico que aparece no topo da página se uma nova versão estiver disponível. Meu servidor web mantém seus arquivos de log por mais ou menos 5 antes de os apagar; Eu não guardo nenhuma ligação entre as verificações de versão e os endereços IP de cada um.) Security_PasswordTitle Senha da Interface de utilizador Security_Password Senha Security_PasswordUpdate Alterada a senha para %s Security_AUTHTitle Autenticação Segura de Senha/AUTH Security_SecureServer Servidor Seguro Security_SecureServerUpdate Alterado o servidor seguro para %s; esta alteração não terá efeito até que você reinicie o POPFile Security_SecurePort Porta segura Security_SecurePortUpdate Alterada a porta para %s; esta alteração não terá efeito até que você reinicie o POPFile Security_POP3 Aceitar conexões POP3 de máquinas remotas Security_UI Aceitar conexões HTTP (Interface de utilizador) de máquinas remotas Security_UpdateTitle Verificação Automática de Atualizações Security_Update Verificar diariamente atualizações para o POPFile Security_StatsTitle Reportar Estatísticas Security_Stats Enviar estatísticas para o John diariamente Magnet_Error1 Íman '%s' já existe no receptáculo '%s' Magnet_Error2 O novo íman '%s' colide com o íman '%s' no receptáculo '%s' e pode causar resultados ambíguos. O novo íman não foi adicionado. Magnet_Error3 Criar novo íman '%s' no receptáculo '%s' Magnet_CurrentMagnets Ímans Actuais Magnet_Message1 Os seguintes ímans atraem as mensagens para receptáculo especificado. Magnet_CreateNew Criar Novo Íman Magnet_Explanation Três tipos de íman estão disponíveis: <ul><li>De um endereço ou nome:</b> Por exemplo: ad...@co... para apanhar um endereço específico, <br />companhia.com para apanhar todo mundo que manda mensagens de companhia.com, <br />Adriano Gomes para apanhar uma pessoa específica, Adriano para apanhar todos os Adrianos</li><li><b>Para um endereço ou nome:</b> Como um íman Originador: mas para o endereço Para: de uma mensagem </li><li><b>Palavras no assunto:</b> Por exemplo: olá para apanhar todas as mensagens com olá no assunto</li></ul> Magnet_MagnetType Tipo do íman Magnet_Value Valor Magnet_Always Coloca sempre no receptáculo Bucket_Error1 Nomes de receptáculos apenas podem conter as letras de a até z minúsculas mais - e _ Bucket_Error2 O receptáculo %s já existe Bucket_Error3 Criado o receptáculo %s Bucket_Error4 Por favor digite uma palavra que não seja em branco Bucket_Error5 Renomeado o receptáculo %s para %s Bucket_Error6 Apagado o receptáculo %s Bucket_Title Sumário Bucket_BucketName Nome do receptáculo Bucket_WordCount Palavras Bucket_WordCounts Distribuição de Palavras Bucket_UniqueWords Palavras Únicas Bucket_SubjectModification Modificação do Assunto Bucket_ChangeColor Alterar Cor Bucket_NotEnoughData Dados insuficientes Bucket_ClassificationAccuracy Exactidão da Classificação Bucket_EmailsClassified Mensagens classificadas Bucket_EmailsClassifiedUpper Distribuição de Mensagens Bucket_ClassificationErrors Erros de classificação Bucket_Accuracy Exactidão Bucket_ClassificationCount Mensagens Bucket_ResetStatistics Reiniciar contagem Bucket_LastReset Início da contagem Bucket_CurrentColor A côr actual do receptáculo "%s" é "%s" Bucket_SetColorTo Alterar a côr do receptáculo "%s" para "%s" Bucket_Maintenance Manutenção Bucket_CreateBucket Criar um receptáculo com o nome Bucket_DeleteBucket Apagar o receptáculo chamado Bucket_RenameBucket Renomear o receptáculo chamado Bucket_Lookup Procurar Bucket_LookupMessage Procurar por palavra nos receptáculos Bucket_LookupMessage2 Procurar no resultado por Bucket_LookupMostLikely <b>%s</b> é mais provável aparecer em <font color="%s">%s</font> Bucket_DoesNotAppear <p><b>%s</b> não aparece em nenhum dos receptáculos Bucket_DisabledGlobally Desligado globalmente Bucket_To para Bucket_Quarantine Quarentena SingleBucket_Title Detalhes do receptáculo %s SingleBucket_WordCount Contagem de palavras do receptáculo SingleBucket_TotalWordCount Contagem total de palavras SingleBucket_Percentage Percentagem do total SingleBucket_WordTable Tabela de palavras do receptáculo %s SingleBucket_Message1 Palavras com asterisco (*) foram usadas para classificação durante esta sessão do POPFile. Clique em qualquer palavra para procurar sua probabilidade para todos os receptáculos. SingleBucket_Unique %s únicas Header_MenuSummary This table is the navigation menu which allows access to each of the different pages of the control center. History_MainTableSummary This table shows the sender and subject of recently received messages and allows them to be reviewed and reclassified. Clicking on the subject line will show the full message text, along with information about why it was classified as it was. The 'Should be' column allows you to specify which bucket the message belongs in, or to undo that change. The 'Delete' column allows you to delete specific messages from the history if you don't need them anymore. History_OpenMessageSummary This table contains the full text of an email message, with the words that are used for classification highlighted according to the bucket that was most relevant for each. Bucket_MainTableSummary This table provides an overview of the classification buckets. Each row shows the bucket name, the word count total for that bucket, the actual number of individual words in each bucket, whether the email's subject line will be modified when it gets classified to that bucket, whether to quarantine the messages received in that bucket, and a table to pick the color used in displaying anything related to that bucket in the control center. Bucket_StatisticsTableSummary This table provides three sets of statistics on the overall performance of PopFile. The first is how accurate its classification is, the second is how many emails have been classified, and to which buckets, and the third is how many words are in each bucket, and what their relative percentages are. Bucket_MaintenanceTableSummary This table contains forms that allow you to create, delete or rename buckets, and to lookup a word in all of the buckets to see its relative probabilities. Bucket_AccuracyChartSummary This table graphically represents the accuracy of the email classification. Bucket_BarChartSummary This table graphically represents a percentage allocation for each of the different buckets. It is used for both number of emails classified, and total word counts. Bucket_LookupResultsSummary This table shows the probabilities associated with any given word of the corpus. For each bucket, it shows the frequency that that word occurs, the probability that it will occur in that bucket, and the overall effect on the score of the bucket if that word exists in an email. Bucket_WordListTableSummary This table provides a listing of all the words for a particular bucket, organized by common first letter for each row. Magnet_MainTableSummary This table shows the list of magnets that are used to automatically classify email according to fixed rules. Each row shows how the magnet is defined, what bucket it is intended for, and a button to delete the magnet. Configuration_MainTableSummary This table contains a number of forms to allow you to control the configuration of PopFile. Configuration_InsertionTableSummary This table contains buttons that determine whether or not certain modifications are made to the headers or subject line of the email before it is passed on to the email client. Security_MainTableSummary This table provides sets of controls that affect the security of the overall configuration of PopFile, whether it should automatically check for updates to the program, and whether statistics about PopFile's performance should be sent to the central datastore of the program's author for general information. Advanced_MainTableSummary This table provides a list of words that PopFile ignores when classifying email due to their relative frequency in email in general. They are organized per row according to the first letter of the words. Index: Suomi.msg =================================================================== RCS file: /cvsroot/popfile/engine/languages/Suomi.msg,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Suomi.msg 20 May 2003 20:01:17 -0000 1.7 --- Suomi.msg 11 Jun 2003 14:45:14 -0000 1.8 *************** *** 1,3 **** ! # Copyright (c) 2001-2003 John Graham-Cumming # Identify the language and character set used for the interface --- 1,4 ---- ! MIME-Version: 1.0 ! # Identify the language and character set used for the interface *************** *** 48,51 **** --- 49,53 ---- Count Määrä Update Päivitä + Refresh Virkistä tämä sivu # The header and footer that appear on every UI page *************** *** 189,196 **** Magnet_Message1 Seuraavat magneetit aiheuttavat sen, että viestit luokitellaan aina määriteltyyn sankoon. Magnet_CreateNew Luo uusi magneetti ! Magnet_Explanation On kolmenlaisia magneetteja:</b> <ul><li><b>Lähettäjän osoite tai nimi:</b> esimerkiksi "er...@es..." yksittäistä osoitetta varten, <br />"esimerkki.fi" kaikkia niitä varten, joiden osoite päättyy "esimerkki.fi", <br />"Erkki Esimerkki" yksittäistä henkilöä varten ja "Erkki" kaikkia Erkkejä varten</li><li><b>Vastaanottajan osoite tai nimi:</b> Samalla tavoin kuin lähettäjämagneettien kanssa, mutta vastaanottajien osoitteiden kanssa</li><li><b>Sanat aiheessa:</b> esimerkiksi "heipparallaa" kaikkia sellaisia viestejä varten, joiden aiherivillä on sana "heipparallaa".</li></ul> Magnet_MagnetType Magneetin tyyppi Magnet_Value arvo Magnet_Always laitetaan aina sankoon Bucket_Error1 Sangon nimessä saa olla ainoastaan pieniä kirjaimia a:sta z:aan, sekä merkkejä "-" ja "_" --- 191,199 ---- Magnet_Message1 Seuraavat magneetit aiheuttavat sen, että viestit luokitellaan aina määriteltyyn sankoon. Magnet_CreateNew Luo uusi magneetti ! Magnet_Explanation On olemassa seuraavanlaisia magneetteja:</b> <ul><li><b>Lähettäjän osoite tai nimi:</b> esimerkiksi "er...@es..." yksittäistä osoitetta varten, <br />"esimerkki.fi" kaikkia niitä varten, joiden osoite päättyy "esimerkki.fi", <br />"Erkki Esimerkki" yksittäistä henkilöä varten ja "Erkki" kaikkia Erkkejä varten</li><li><b>Vastaanottajan osoite tai nimi/Kopio:</b> Samalla tavoin kuin lähettäjämagneettien kanssa, mutta vastaanottajien/kopion saavien osoitteiden kanssa</li><li><b>Sanat aiheessa:</b> esimerkiksi "heipparallaa" kaikkia sellaisia viestejä varten, joiden aiherivillä on sana "heipparallaa".</li></ul> Magnet_MagnetType Magneetin tyyppi Magnet_Value arvo Magnet_Always laitetaan aina sankoon + Magnet_Jump Siirry sivulle Bucket_Error1 Sangon nimessä saa olla ainoastaan pieniä kirjaimia a:sta z:aan, sekä merkkejä "-" ja "_" |
|
From: <sta...@us...> - 2003-06-10 14:10:31
|
Update of /cvsroot/popfile/engine/languages In directory sc8-pr-cvs1:/tmp/cvs-serv21385 Modified Files: Português do Brasil.msg Log Message: synced to english.msg ver. 1.35 by Adriano Rafael Gomes Index: Português do Brasil.msg =================================================================== RCS file: /cvsroot/popfile/engine/languages/Português do Brasil.msg,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Português do Brasil.msg 22 May 2003 18:20:01 -0000 1.12 --- Português do Brasil.msg 10 Jun 2003 14:10:28 -0000 1.13 *************** *** 7,11 **** # This is used to get the appropriate subdirectory for the manual ManualLanguage br ! # Common words that are used on their own all over the interface Apply Aplicar --- 7,11 ---- # This is used to get the appropriate subdirectory for the manual ManualLanguage br ! # Common words that are used on their own all over the interface Apply Aplicar *************** *** 20,25 **** --- 20,29 ---- From De Subject Assunto + Cc Cc Classification Classificação Reclassify Reclassificar + Probability Probabilidade + Scores Pontuações + QuickMagnets Ímãs Rápidos Undo Desfazer Close Fechar *************** *** 41,48 **** Score Pontuação Lookup Procurar # The header and footer that appear on every UI page Header_Title Centro de Controle do POPFile ! Header_Shutdown Desligar Header_History Histórico Header_Buckets Baldes --- 45,56 ---- Score Pontuação Lookup Procurar + Word Palavra + Count Contagem + Update Alterar + Refresh Atualizar # The header and footer that appear on every UI page Header_Title Centro de Controle do POPFile ! Header_Shutdown Desligar o POPFile Header_History Histórico Header_Buckets Baldes *************** *** 55,59 **** Footer_Manual Manual Footer_Forums Forums ! Footer_FeedMe Me Mantenha! Footer_RequestFeature Pedir uma Característica Footer_MailingList Lista de Email --- 63,67 ---- Footer_Manual Manual Footer_Forums Forums ! Footer_FeedMe Contribua Footer_RequestFeature Pedir uma Característica Footer_MailingList Lista de Email *************** *** 65,76 **** Configuration_Error5 O número de dias no histórico deve ser um número entre 1 e 366 Configuration_Error6 O tempo limite TCP deve ser um número entre 10 e 300 Configuration_POP3Port Porta de escuta POP3 ! Configuration_POP3Update Alterada a porta para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_Separator Caracter separador ! Configuration_SepUpdate Alterado o separador para %s Configuration_UI Porta da interface web de usuário Configuration_UIUpdate Alterada a porta da interface web de usuário para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_History Número de emails por página ! Configuration_HistoryUpdate Alterado o número de emails por página para %s Configuration_Days Número de dias para manter no histórico Configuration_DaysUpdate Alterado o número de dias para manter no histórico para %s --- 73,93 ---- Configuration_Error5 O número de dias no histórico deve ser um número entre 1 e 366 Configuration_Error6 O tempo limite TCP deve ser um número entre 10 e 300 + Configuration_Error7 A porta XML RPC deve ser um número entre 1 e 65535 Configuration_POP3Port Porta de escuta POP3 ! Configuration_POP3Update Alterada a porta POP3 para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_XMLRPCUpdate Alterada a porta XML-RPC para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_XMLRPCPort Porta de escuta XML-RPC ! Configuration_SMTPPort Porta de escuta SMTP ! Configuration_SMTPUpdate Alterada a porta SMTP para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_NNTPPort Porta de escuta NNTP ! Configuration_NNTPUpdate Alterada a porta NNTP para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_POP3Separator Caractere separador POP3 computador:porta:usuário ! Configuration_NNTPSeparator Caractere separador NNTP computador:porta:usuário ! Configuration_POP3SepUpdate Alterado o separador POP3 para %s ! Configuration_NNTPSepUpdate Alterado o separador NNTP para %s Configuration_UI Porta da interface web de usuário Configuration_UIUpdate Alterada a porta da interface web de usuário para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Configuration_History Número de mensagens por página ! Configuration_HistoryUpdate Alterado o número de mensagens por página para %s Configuration_Days Número de dias para manter no histórico Configuration_DaysUpdate Alterado o número de dias para manter no histórico para %s *************** *** 80,92 **** Configuration_Language Linguagem Configuration_LanguageChoose Escolha a linguagem ! Configuration_ListenPorts Portas de Escuta Configuration_HistoryView Exibir Histórico ! Configuration_TCPTimeout Tempo Limite de Conexão TCP ! Configuration_TCPTimeoutSecs Tempo limite de conexão TCP em segundos Configuration_TCPTimeoutUpdate Alterado o tempo limite de conexão TCP para %s ! Configuration_ClassificationInsertion Inserção de Classificação Configuration_SubjectLine Modificação de linha de assunto ! Configuration_XTCInsertion Inserção de X-Text-Classification ! Configuration_XPLInsertion Inserção de X-POPFile-Link Configuration_Logging Logging Configuration_None Nada --- 97,109 ---- Configuration_Language Linguagem Configuration_LanguageChoose Escolha a linguagem ! Configuration_ListenPorts Opções do Módulo Configuration_HistoryView Exibir Histórico ! Configuration_TCPTimeout Tempo Limite de Conexão ! Configuration_TCPTimeoutSecs Tempo limite de conexão em segundos Configuration_TCPTimeoutUpdate Alterado o tempo limite de conexão TCP para %s ! Configuration_ClassificationInsertion Inserção de Texto na Mensagem Configuration_SubjectLine Modificação de linha de assunto ! Configuration_XTCInsertion Cabeçalho X-Text-Classification ! Configuration_XPLInsertion Cabeçalho X-POPFile-Link Configuration_Logging Logging Configuration_None Nada *************** *** 98,115 **** Configuration_SmallSkins Small Skins Configuration_TinySkins Tiny Skins ! Advanced_Error1 '%s' já está na lista de palavras ignoradas Advanced_Error2 Palavras ignoradas podem somente conter caracteres alfanuméricos, ., _, -, ou @ ! Advanced_Error3 '%s' adicionado na lista de palavras ignoradas ! Advanced_Error4 '%s' não estã na lista de palavras ignoradas ! Advanced_Error5 '%s' removido da lista de palavras ignoradas Advanced_StopWords Palavras Ignoradas ! Advanced_Message1 As seguintes palavras são ignoradas de todas as classificações porque ocorrem muito freqüentemente. Advanced_AddWord Adicionar palavra Advanced_RemoveWord Remover palavra History_Filter (apenas mostrando o balde <font color="%s">%s</font>) ! History_FilterBy Filter By ! History_Search (procurado pelo assunto %s) History_Title Mensagens Recentes History_Jump Ir para a mensagem --- 115,133 ---- Configuration_SmallSkins Small Skins Configuration_TinySkins Tiny Skins + Configuration_CurrentLogFile <arquivo corrente de log> ! Advanced_Error1 '%s' já está na lista de Palavras Ignoradas Advanced_Error2 Palavras ignoradas podem somente conter caracteres alfanuméricos, ., _, -, ou @ ! Advanced_Error3 '%s' adicionado na lista de Palavras Ignoradas ! Advanced_Error4 '%s' não está na lista de Palavras Ignoradas ! Advanced_Error5 '%s' removido da lista de Palavras Ignoradas Advanced_StopWords Palavras Ignoradas ! Advanced_Message1 O POPFile ignora as seguintes palavras freqüentemente usadas: Advanced_AddWord Adicionar palavra Advanced_RemoveWord Remover palavra History_Filter (apenas mostrando o balde <font color="%s">%s</font>) ! History_FilterBy Filtrar Por ! History_Search (procurado por de/assunto %s) History_Title Mensagens Recentes History_Jump Ir para a mensagem *************** *** 120,123 **** --- 138,142 ---- History_ClassifyAs Classificar como History_MagnetUsed Ímã usado + History_MagnetBecause <b>Ímã Usado</b><p>Classificado para <font color="%s">%s</font> por causa do ímã %s </p> History_ChangedTo Alterado para <font color="%s">%s History_Already Já reclassificado como <font color="%s">%s</font> *************** *** 125,132 **** History_RemovePage Remover a Página History_Remove Para remover entradas do histórico clique ! History_SearchMessage Procurar Assunto History_NoMessages Nenhuma mensagem ! History_ShowMagnet Magnetizado ! History_Magnet (apenas mostrando mensagens classificadas por ímã) Password_Title Senha --- 144,154 ---- History_RemovePage Remover a Página History_Remove Para remover entradas do histórico clique ! History_SearchMessage Procurar De/Assunto History_NoMessages Nenhuma mensagem ! History_ShowMagnet magnetizado ! History_ShowNoMagnet não magnetizado ! History_Magnet (mostrando apenas mensagens classificadas por ímã) ! History_NoMagnet (mostrando apenas mensagens não classificadas por ímã) ! History_ResetSearch Resetar Password_Title Senha *************** *** 135,139 **** Password_Error1 Senha incorreta ! Security_Error1 A porta segura deve ser um número entre 1 e 65535 Security_Stealth Modo Stealth/Operação Servidor Security_NoStealthMode Não (Modo Stealth) --- 157,161 ---- Password_Error1 Senha incorreta ! Security_Error1 A porta deve ser um número entre 1 e 65535 Security_Stealth Modo Stealth/Operação Servidor Security_NoStealthMode Não (Modo Stealth) *************** *** 143,157 **** Security_Password Senha Security_PasswordUpdate Alterada a senha para %s ! Security_AUTHTitle Autenticação Segura de Senha/AUTH ! Security_SecureServer Servidor Seguro ! Security_SecureServerUpdate Alterado o servidor seguro para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_SecurePort Porta segura ! Security_SecurePortUpdate Alterada a porta para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_POP3 Aceitar conexões POP3 de máquinas remotas ! Security_UI Aceitar conexões HTTP (Interface de Usuário) de máquinas remotas Security_UpdateTitle Verificação Automática de Atualização Security_Update Verificar diariamente atualizações para o POPFile Security_StatsTitle Reportar Estatísticas ! Security_Stats Enviar estatísticas para o John diariamente Magnet_Error1 Ímã '%s' já existe no balde '%s' --- 165,186 ---- Security_Password Senha Security_PasswordUpdate Alterada a senha para %s ! Security_AUTHTitle Servidores Remotos ! Security_SecureServer Servidor POP3 SPA/AUTH ! Security_SecureServerUpdate Alterado o servidor seguro POP3 SPA/AUTH para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_SecurePort Porta POP3 SPA/AUTH ! Security_SecurePortUpdate Alterada a porta POP3 SPA/AUTH para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_SMTPServer Servidor da cadeia SMTP ! Security_SMTPServerUpdate Alterado o servidor da cadeia SMTP para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_SMTPPort Porta da cadeia SMTP ! Security_SMTPPortUpdate Alterada a porta da cadeia SMTP para %s; esta alteração não terá efeito até que você reinicie o POPFile ! Security_POP3 Aceitar conexões POP3 de máquinas remotas (requer reiniciar o POPFile) ! Security_SMTP Aceitar conexões SMTP de máquinas remotas (requer reiniciar o POPFile) ! Security_NNTP Aceitar conexões NNTP de máquinas remotas (requer reiniciar o POPFile) ! Security_UI Aceitar conexões HTTP (Interface de Usuário) de máquinas remotas (requer reiniciar o POPFile) ! Security_XMLRPC Aceitar conexões XML-RPC de máquinas remotas (requer reiniciar o POPFile) Security_UpdateTitle Verificação Automática de Atualização Security_Update Verificar diariamente atualizações para o POPFile Security_StatsTitle Reportar Estatísticas ! Security_Stats Enviar estatísticas diariamente Magnet_Error1 Ímã '%s' já existe no balde '%s' *************** *** 161,170 **** Magnet_Message1 Os seguintes ímãs fazem os emails serem sempre classificados no balde especificado. Magnet_CreateNew Criar Novo Ímã ! Magnet_Explanation Três tipos de ímã estão disponíveis: <ul><li>De um endereço ou nome:</b> Por exemplo: ad...@co... para pegar um endereço específico, <br />companhia.com para pegar todo mundo que manda email de companhia.com, <br />Adriano Gomes para pegar uma pessoa específica, Adriano para pegar todos os Adrianos.</li><li><b>Para um endereço ou nome:</b> Como um ímã De: mas para o endereço Para: de um email.</li><li><b>Palavras no assunto:</b> Por exemplo: olá para pegar todas as mensagens com olá no assunto.</li></ul> Magnet_MagnetType Tipo do ímã Magnet_Value Valor Magnet_Always Sempre vai para o balde ! Bucket_Error1 Nomes de balde somente podem conter as letras de a até z minúsculas mais - e _ Bucket_Error2 O balde %s já existe Bucket_Error3 Criado o balde %s --- 190,200 ---- Magnet_Message1 Os seguintes ímãs fazem os emails serem sempre classificados no balde especificado. Magnet_CreateNew Criar Novo Ímã ! Magnet_Explanation Estes tipos de ímã estão disponíveis: <ul><li>De um endereço ou nome:</b> Por exemplo: jo...@co... para pegar um endereço específico, <br />companhia.com para pegar todo mundo que manda email de companhia.com, <br />João Silva para pegar uma pessoa específica, João para pegar todos os Joãos.</li><li><b>Para/Cc um endereço ou nome:</b> Como um ímã De: mas para o endereço Para:/Cc: em uma mensagem.</li><li><b>Palavras no assunto:</b> Por exemplo: olá para pegar todas as mensagens com olá no assunto.</li></ul> Magnet_MagnetType Tipo do ímã Magnet_Value Valor Magnet_Always Sempre vai para o balde + Magnet_Jump Pula para a página de ímãs ! Bucket_Error1 Nomes de balde somente podem conter as letras de a até z minúsculas, números de 0 a 9, mais - e _ Bucket_Error2 O balde %s já existe Bucket_Error3 Criado o balde %s *************** *** 181,189 **** Bucket_NotEnoughData Dados insuficientes Bucket_ClassificationAccuracy Precisão da Classificação ! Bucket_EmailsClassified Emails classificados ! Bucket_EmailsClassifiedUpper Emails Classificados Bucket_ClassificationErrors Erros de classificação Bucket_Accuracy Precisão Bucket_ClassificationCount Contagem da Classificação Bucket_ResetStatistics Reiniciar Estatísticas Bucket_LastReset Último Reinício --- 211,221 ---- Bucket_NotEnoughData Dados insuficientes Bucket_ClassificationAccuracy Precisão da Classificação ! Bucket_EmailsClassified Mensagens classificadas ! Bucket_EmailsClassifiedUpper Mensagens Classificadas Bucket_ClassificationErrors Erros de classificação Bucket_Accuracy Precisão Bucket_ClassificationCount Contagem da Classificação + Bucket_ClassificationFP Positivos Falsos + Bucket_ClassificationFN Negativos Falsos Bucket_ResetStatistics Reiniciar Estatísticas Bucket_LastReset Último Reinício *************** *** 208,228 **** SingleBucket_Percentage Percentual do total SingleBucket_WordTable Tabela de Palavras para %s ! SingleBucket_Message1 Palavras com asterico (*) foram usadas para classificação durante esta sessão do POPFile. Clique em qualquer palavra para procurar sua probabilidade para todos os buckets. SingleBucket_Unique %s únicas Header_MenuSummary Esta tabela é o menu de navegação que possibilita acesso a cada uma das diferentes páginas do centro de controle. History_MainTableSummary Esta tabela mostra o remetente e o assunto das mensagens recebidas recentemente e permite que elas sejam revisadas e reclassificadas. Clicar na linha de assunto vai mostrar o texto inteiro da mensagem, juntamente com informação sobre por que ela foi classificada como o foi. A coluna 'Deveria ser' permite que você especifique a que balde a mensagem pertence, ou desfazer esta mudança. A coluna 'Remover' permite que você exclua mensagens específicas do histórico se você não precisar mais delas. ! History_OpenMessageSummary Esta tabela contém o texto integral de uma mensagem, com as palavras que são usadas para classificação destacadas de acordo com o balde que foi mais relevante para elas. ! Bucket_MainTableSummary Esta tabela fornece uma visão geral dos baldes de classificação. Cada linha mostra o nome do balde, a contagem total de palavras para aquele balde, o número real de palavras individuais em cada balde, se o assunto do email vai ser modificado quando ele for classificado para aquele balde, se as mensagens recebidas naquele balde devem ficar em quarentena, e uma tabela para escolher a cor usada para mostrar qualquer coisa relacionada àquele balde no centro de controle. ! Bucket_StatisticsTableSummary Esta tabela fornece três conjuntos de estatísticas sobre o desempenho geral do PopFile. A primeira é a exatidão da classificação, a segunda é quantos emails foram classificados, e para quais baldes, e a terceira é quantas palavras existem em cada balde, e as suas porcentagens relativas. Bucket_MaintenanceTableSummary Esta tabela contém formulários que permitem que você crie, exclua ou renomeie baldes, e para procurar uma palavra em todos os baldes e ver as suas probabilidades relativas. ! Bucket_AccuracyChartSummary Esta tabela representa graficamente a exatidão da classificação de email. ! Bucket_BarChartSummary Esta tabela representa graficamente a uma alocação porcentual para cada um dos diferentes baldes. Ela é usada tanto para o número de emails classificados como para o número total de palavras. ! Bucket_LookupResultsSummary Esta tabela mostra as probabilidades associadas com qualquer palavra específica do corpus. Para cada balde, ela mostra a freqüência com que aquela palavra ocorre, a probabilidade de que ela ocorra naquele balde, e o efeito geral na pontuação do balde se aquela palavra existir em um email. Bucket_WordListTableSummary Esta tabela fornece uma relação de todas as palavras para um balde específico, organizada pela primeira letra comum para cada linha. Magnet_MainTableSummary Esta tabela mostra a lista de ímãs que são usados para classificar automaticamente mensagens de acordo com regras fixas. Cada linha mostra como o ímã está definido, para qual balde ele foi concebido, e um botão para excluir aquele ímã. Configuration_MainTableSummary Esta tabela contém alguns formulários que permitem que você controle a configuração do PopFile. ! Configuration_InsertionTableSummary Esta tabela contém botões para determinar se certas modificações são feitas no cabeçalho ou no assunto da mensagem antes que ela seja encaminhada para o programa cliente de email. Security_MainTableSummary Esta tabela fornece conjuntos de controles que afetam a segurança da configuração geral do PopFile, se ele deve procurar automaticamente por atualizações do programa, e se estatísticas sobre o desempenho do PopFile devem ser enviadas ao banco de dados central do autor do programa para informação geral. ! Advanced_MainTableSummary Esta tabela fornece uma lista de palavras que o PopFile ignora quando classifica mensagens por causa da sua freqüência relativa nos emails em geral. Elas são organizadas por linha de acordo com a primeira letra das palavras. --- 240,268 ---- SingleBucket_Percentage Percentual do total SingleBucket_WordTable Tabela de Palavras para %s ! SingleBucket_Message1 Clique em uma letra no índice para ver a lista de palavras que começam com tal letra. Clique em qualquer palavra para procurar sua probabilidade para todos os baldes. SingleBucket_Unique %s únicas + SingleBucket_ClearBucket Remover Todas Palavras + + Session_Title A Sessão do POPFile Expirou + Session_Error Sua sessão do POPFile expirou. Isto pode ter acontecido por iniciar e finalizar o POPFile mas ter deixado seu navegador web aberto. Por favor clique em um dos links acima para continuar a usar o POPFile. + + View_Title Visualização de Mensagem Única Header_MenuSummary Esta tabela é o menu de navegação que possibilita acesso a cada uma das diferentes páginas do centro de controle. History_MainTableSummary Esta tabela mostra o remetente e o assunto das mensagens recebidas recentemente e permite que elas sejam revisadas e reclassificadas. Clicar na linha de assunto vai mostrar o texto inteiro da mensagem, juntamente com informação sobre por que ela foi classificada como o foi. A coluna 'Deveria ser' permite que você especifique a que balde a mensagem pertence, ou desfazer esta mudança. A coluna 'Remover' permite que você exclua mensagens específicas do histórico se você não precisar mais delas. ! History_OpenMessageSummary Esta tabela contém o texto integral de uma mensagem, com as palavras que são usadas para classificação destacadas de acordo com o balde que foi mais relevante para elas. ! Bucket_MainTableSummary Esta tabela fornece uma visão geral dos baldes de classificação. Cada linha mostra o nome do balde, a contagem total de palavras para aquele balde, o número real de palavras individuais em cada balde, se o assunto da mensagem vai ser modificado quando ele for classificado para aquele balde, se as mensagens recebidas naquele balde devem ficar em quarentena, e uma tabela para escolher a cor usada para mostrar qualquer coisa relacionada àquele balde no centro de controle. ! Bucket_StatisticsTableSummary Esta tabela fornece três conjuntos de estatísticas sobre o desempenho geral do PopFile. A primeira é a exatidão da classificação, a segunda é quantas mensagens foram classificadas, e para quais baldes, e a terceira é quantas palavras existem em cada balde, e as suas porcentagens relativas. Bucket_MaintenanceTableSummary Esta tabela contém formulários que permitem que você crie, exclua ou renomeie baldes, e para procurar uma palavra em todos os baldes e ver as suas probabilidades relativas. ! Bucket_AccuracyChartSummary Esta tabela representa graficamente a exatidão da classificação de mensagem. ! Bucket_BarChartSummary Esta tabela representa graficamente a uma alocação porcentual para cada um dos diferentes baldes. Ela é usada tanto para o número de mensagens classificadas como para o número total de palavras. ! Bucket_LookupResultsSummary Esta tabela mostra as probabilidades associadas com qualquer palavra específica do corpus. Para cada balde, ela mostra a freqüência com que aquela palavra ocorre, a probabilidade de que ela ocorra naquele balde, e o efeito geral na pontuação do balde se aquela palavra existir em uma mensagem. Bucket_WordListTableSummary Esta tabela fornece uma relação de todas as palavras para um balde específico, organizada pela primeira letra comum para cada linha. Magnet_MainTableSummary Esta tabela mostra a lista de ímãs que são usados para classificar automaticamente mensagens de acordo com regras fixas. Cada linha mostra como o ímã está definido, para qual balde ele foi concebido, e um botão para excluir aquele ímã. Configuration_MainTableSummary Esta tabela contém alguns formulários que permitem que você controle a configuração do PopFile. ! Configuration_InsertionTableSummary Esta tabela contém botões para determinar se certas modificações são feitas no cabeçalho ou no assunto da mensagem antes que ela seja encaminhada para o programa cliente de mensagens. Security_MainTableSummary Esta tabela fornece conjuntos de controles que afetam a segurança da configuração geral do PopFile, se ele deve procurar automaticamente por atualizações do programa, e se estatísticas sobre o desempenho do PopFile devem ser enviadas ao banco de dados central do autor do programa para informação geral. ! Advanced_MainTableSummary Esta tabela fornece uma lista de palavras que o PopFile ignora quando classifica mensagens por causa da sua freqüência relativa nas mensagens em geral. Elas são organizadas por linha de acordo com a primeira letra das palavras. ! ! |
|
From: <jgr...@us...> - 2003-06-10 13:39:55
|
Update of /cvsroot/popfile/engine/languages
In directory sc8-pr-cvs1:/tmp/cvs-serv6646
Added Files:
check.pl
Log Message:
Added new check.pl script used to help people doing localization figure out what's changed
--- NEW FILE: check.pl ---
#----------------------------------------------------------------------------
#
# check.pl
#
# Checks language files for inconsistency against the English.msg
# file. Run check.pl and it will report missing or extraneous
# entries in all the MSG files present
#
# Copyright (c) 2003 John Graham-Cumming
#
#----------------------------------------------------------------------------
# The US English MSG file is loaded into this hash since it is
# the definitive version and is used to check against the other
# languages
my %english;
# ---------------------------------------------------------------------------------------------
#
# load_language - Load a language file into a hash
#
# $file The msg file to load
# $hash Reference to hash to store the values in
#
# ---------------------------------------------------------------------------------------------
sub load_language
{
my ( $file, $hash ) = @_;
if ( open LANG, "<$file" ) {
while ( <LANG> ) {
next if ( /^[ \t]*#/ );
if ( /([^ \t]+)[ \t]+(.+)/ ) {
my $id = $1;
my $msg = $2;
$msg =~ s/[\r\n]//g;
$$hash{$id} = $msg;
}
}
close LANG;
}
}
# ---------------------------------------------------------------------------------------------
#
# check_language - Verify that a language file is consistent with the English version
#
# $file The language to check against English
#
# ---------------------------------------------------------------------------------------------
sub check_language
{
my ( $file ) = @_;
print "\nChecking language $file...\n";
my %lang;
load_language( $file, \%lang );
# First check to see if there are any entries in the English hash
# that are not present in the lang hash
foreach my $key (sort keys %english) {
if ( !defined( $lang{$key} ) ) {
print "MISSING: $key\n";
}
}
# Now check for keys that we don't need any more
foreach my $key (sort keys %lang) {
if ( !defined( $english{$key} ) ) {
print "DEPRECATED: $key\n";
}
}
}
# MAIN
load_language( 'English.msg', \%english );
my @msgs;
if ( $ARGV[0] ne '' ) {
@msgs = ( $ARGV[0] );
} else {
@msgs = glob "*.msg";
}
foreach $msg (@msgs) {
check_language( $msg );
}
|
|
From: <ssc...@us...> - 2003-06-10 00:24:47
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv30036
Modified Files:
Tag: v0/18/1
installer.nsi
Log Message:
update versions, change perl location to match my local setup
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.33
retrieving revision 1.33.2.1
diff -C2 -d -r1.33 -r1.33.2.1
*** installer.nsi 27 Feb 2003 17:58:11 -0000 1.33
--- installer.nsi 10 Jun 2003 00:24:43 -0000 1.33.2.1
***************
*** 4,8 ****
; Modified to work with NSIS v2.0b1
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.18.1"
!include "MUI.nsh"
;--------------------------------
--- 4,8 ----
; Modified to work with NSIS v2.0b1
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.18.2"
!include "MUI.nsh"
;--------------------------------
***************
*** 138,142 ****
SetOutPath $INSTDIR
! File "..\engine\v0.18.1.change"
File "..\engine\*.pl"
File "..\engine\pix.gif"
--- 138,142 ----
SetOutPath $INSTDIR
! File "..\engine\v0.18.2.change"
File "..\engine\*.pl"
File "..\engine\pix.gif"
***************
*** 172,245 ****
SetOutPath $INSTDIR
! File "C:\Perl58\bin\perl.exe"
! File "C:\Perl58\bin\wperl.exe"
! File "C:\Perl58\bin\perl58.dll"
! File "C:\Perl58\lib\AutoLoader.pm"
! File "C:\Perl58\lib\Carp.pm"
! File "C:\Perl58\lib\Config.pm"
! File "C:\Perl58\lib\DynaLoader.pm"
! File "C:\Perl58\lib\Errno.pm"
! File "C:\Perl58\lib\Exporter.pm"
! File "C:\Perl58\lib\IO.pm"
! File "C:\Perl58\lib\integer.pm"
! File "C:\Perl58\lib\locale.pm"
! File "C:\Perl58\lib\POSIX.pm"
! File "C:\Perl58\lib\SelectSaver.pm"
! File "C:\Perl58\lib\Socket.pm"
! File "C:\Perl58\lib\strict.pm"
! File "C:\Perl58\lib\Symbol.pm"
! File "C:\Perl58\lib\vars.pm"
! File "C:\Perl58\lib\warnings.pm"
! File "C:\Perl58\lib\XSLoader.pm"
SetOutPath $INSTDIR\Carp
! File "C:\Perl58\lib\Carp\*"
SetOutPath $INSTDIR\Exporter
! File "C:\Perl58\lib\Exporter\*"
SetOutPath $INSTDIR\MIME
! File "C:\Perl58\lib\MIME\*"
SetOutPath $INSTDIR\IO
! File "C:\Perl58\lib\IO\*"
SetOutPath $INSTDIR\Sys
! File "C:\Perl58\lib\Sys\*"
SetOutPath $INSTDIR\Text
! File "C:\Perl58\lib\Text\ParseWords.pm"
SetOutPath $INSTDIR\IO\Socket
! File "C:\Perl58\lib\IO\Socket\*"
SetOutPath $INSTDIR\auto\DynaLoader
! File "C:\Perl58\lib\auto\DynaLoader\*"
SetOutPath $INSTDIR\auto\File\Glob
! File "C:\Perl58\lib\auto\File\Glob\*"
SetOutPath $INSTDIR\auto\MIME\Base64
! File "C:\Perl58\lib\auto\MIME\Base64\*"
SetOutPath $INSTDIR\auto\IO
! File "C:\Perl58\lib\auto\IO\*"
SetOutPath $INSTDIR\auto\Socket
! File "C:\Perl58\lib\auto\Socket\*"
SetOutPath $INSTDIR\auto\Sys\Hostname
! File "C:\Perl58\lib\auto\Sys\Hostname\*"
SetOutPath $INSTDIR\auto\POSIX
! File "C:\Perl58\lib\auto\POSIX\POSIX.dll"
! File "C:\Perl58\lib\auto\POSIX\autosplit.ix"
! File "C:\Perl58\lib\auto\POSIX\load_imports.al"
SetOutPath $INSTDIR\File
! File "C:\Perl58\lib\File\Glob.pm"
SetOutPath $INSTDIR\warnings
! File "C:\Perl58\lib\warnings\register.pm"
; Create the START MENU entries
--- 172,245 ----
SetOutPath $INSTDIR
! File "D:\perl\bin\perl.exe"
! File "D:\perl\bin\wperl.exe"
! File "D:\perl\bin\perl58.dll"
! File "D:\perl\lib\AutoLoader.pm"
! File "D:\perl\lib\Carp.pm"
! File "D:\perl\lib\Config.pm"
! File "D:\perl\lib\DynaLoader.pm"
! File "D:\perl\lib\Errno.pm"
! File "D:\perl\lib\Exporter.pm"
! File "D:\perl\lib\IO.pm"
! File "D:\perl\lib\integer.pm"
! File "D:\perl\lib\locale.pm"
! File "D:\perl\lib\POSIX.pm"
! File "D:\perl\lib\SelectSaver.pm"
! File "D:\perl\lib\Socket.pm"
! File "D:\perl\lib\strict.pm"
! File "D:\perl\lib\Symbol.pm"
! File "D:\perl\lib\vars.pm"
! File "D:\perl\lib\warnings.pm"
! File "D:\perl\lib\XSLoader.pm"
SetOutPath $INSTDIR\Carp
! File "D:\perl\lib\Carp\*"
SetOutPath $INSTDIR\Exporter
! File "D:\perl\lib\Exporter\*"
SetOutPath $INSTDIR\MIME
! File "D:\perl\lib\MIME\*"
SetOutPath $INSTDIR\IO
! File "D:\perl\lib\IO\*"
SetOutPath $INSTDIR\Sys
! File "D:\perl\lib\Sys\*"
SetOutPath $INSTDIR\Text
! File "D:\perl\lib\Text\ParseWords.pm"
SetOutPath $INSTDIR\IO\Socket
! File "D:\perl\lib\IO\Socket\*"
SetOutPath $INSTDIR\auto\DynaLoader
! File "D:\perl\lib\auto\DynaLoader\*"
SetOutPath $INSTDIR\auto\File\Glob
! File "D:\perl\lib\auto\File\Glob\*"
SetOutPath $INSTDIR\auto\MIME\Base64
! File "D:\perl\lib\auto\MIME\Base64\*"
SetOutPath $INSTDIR\auto\IO
! File "D:\perl\lib\auto\IO\*"
SetOutPath $INSTDIR\auto\Socket
! File "D:\perl\lib\auto\Socket\*"
SetOutPath $INSTDIR\auto\Sys\Hostname
! File "D:\perl\lib\auto\Sys\Hostname\*"
SetOutPath $INSTDIR\auto\POSIX
! File "D:\perl\lib\auto\POSIX\POSIX.dll"
! File "D:\perl\lib\auto\POSIX\autosplit.ix"
! File "D:\perl\lib\auto\POSIX\load_imports.al"
SetOutPath $INSTDIR\File
! File "D:\perl\lib\File\Glob.pm"
SetOutPath $INSTDIR\warnings
! File "D:\perl\lib\warnings\register.pm"
; Create the START MENU entries
|
|
From: <jgr...@us...> - 2003-06-09 22:39:24
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv26282/UI
Modified Files:
HTML.pm
Log Message:
Fix dumb bug on my part to do with empty log files
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.167
retrieving revision 1.168
diff -C2 -d -r1.167 -r1.168
*** HTML.pm 9 Jun 2003 18:31:12 -0000 1.167
--- HTML.pm 9 Jun 2003 22:39:18 -0000 1.168
***************
*** 1018,1022 ****
if ( $self->global_config_( 'debug' ) != 0 ) {
! my @log_entries = @{$self->last_ten_log_entries()};
if ( $#log_entries >= -1 ) {
--- 1018,1022 ----
if ( $self->global_config_( 'debug' ) != 0 ) {
! my @log_entries = $self->last_ten_log_entries();
if ( $#log_entries >= -1 ) {
|
|
From: <jgr...@us...> - 2003-06-09 22:39:21
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv26282/POPFile
Modified Files:
Logger.pm
Log Message:
Fix dumb bug on my part to do with empty log files
Index: Logger.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Logger.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Logger.pm 9 Jun 2003 18:31:55 -0000 1.17
--- Logger.pm 9 Jun 2003 22:39:16 -0000 1.18
***************
*** 189,193 ****
my ( $self ) = @_;
! return $self->{last_ten__};
}
--- 189,198 ----
my ( $self ) = @_;
! if ( $#{$self->{last_ten__}} >= 0 ) {
! return @{$self->{last_ten__}};
! } else {
! my @temp = ( 'log empty' );
! return @temp;
! }
}
|
|
From: <jgr...@us...> - 2003-06-09 18:36:01
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv22273 Added Files: vars.mak Log Message: Added vars.mak --- NEW FILE: vars.mak --- # POPFile Makefile # # This Makefile is used for the creation of POPFile packages # and for testing # # Copyright (c) 2003 John Graham-Cumming export POPFILE_VERSION=0.19.0 |
|
From: <jgr...@us...> - 2003-06-09 18:35:20
|
Update of /cvsroot/popfile/windows
In directory sc8-pr-cvs1:/tmp/cvs-serv21962
Modified Files:
installer.nsi
Log Message:
Move Perl from Perl58
Index: installer.nsi
===================================================================
RCS file: /cvsroot/popfile/windows/installer.nsi,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** installer.nsi 8 Jun 2003 12:55:05 -0000 1.57
--- installer.nsi 9 Jun 2003 18:35:16 -0000 1.58
***************
*** 19,23 ****
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.19.0RC3"
!define RELEASE_NOTES "..\engine\v0.19.0.change"
--- 19,23 ----
!define MUI_PRODUCT "POPFile"
! !define MUI_VERSION "0.19.0RC4"
!define RELEASE_NOTES "..\engine\v0.19.0.change"
***************
*** 317,399 ****
SetOutPath $INSTDIR
! File "C:\Perl58\bin\perl.exe"
! File "C:\Perl58\bin\wperl.exe"
! File "C:\Perl58\bin\perl58.dll"
! File "C:\Perl58\lib\AutoLoader.pm"
! File "C:\Perl58\lib\Carp.pm"
! File "C:\Perl58\lib\Config.pm"
! File "C:\Perl58\lib\DynaLoader.pm"
! File "C:\Perl58\lib\Errno.pm"
! File "C:\Perl58\lib\Exporter.pm"
! File "C:\Perl58\lib\IO.pm"
! File "C:\Perl58\lib\integer.pm"
! File "C:\Perl58\lib\locale.pm"
! File "C:\Perl58\lib\POSIX.pm"
! File "C:\Perl58\lib\SelectSaver.pm"
! File "C:\Perl58\lib\Socket.pm"
! File "C:\Perl58\lib\strict.pm"
! File "C:\Perl58\lib\Symbol.pm"
! File "C:\Perl58\lib\vars.pm"
! File "C:\Perl58\lib\warnings.pm"
! File "C:\Perl58\lib\XSLoader.pm"
SetOutPath $INSTDIR\Carp
! File "C:\Perl58\lib\Carp\*"
SetOutPath $INSTDIR\Exporter
! File "C:\Perl58\lib\Exporter\*"
SetOutPath $INSTDIR\MIME
! File "C:\Perl58\lib\MIME\*"
SetOutPath $INSTDIR\Win32
! File "C:\Perl58\site\lib\Win32\API.pm"
SetOutPath $INSTDIR\Win32\API
! File "C:\Perl58\site\lib\Win32\API\*.pm"
SetOutPath $INSTDIR\auto\Win32\API
! File "C:\Perl58\site\lib\auto\Win32\API\*"
SetOutPath $INSTDIR\IO
! File "C:\Perl58\lib\IO\*"
SetOutPath $INSTDIR\Sys
! File "C:\Perl58\lib\Sys\*"
SetOutPath $INSTDIR\Text
! File "C:\Perl58\lib\Text\ParseWords.pm"
SetOutPath $INSTDIR\IO\Socket
! File "C:\Perl58\lib\IO\Socket\*"
SetOutPath $INSTDIR\auto\DynaLoader
! File "C:\Perl58\lib\auto\DynaLoader\*"
SetOutPath $INSTDIR\auto\File\Glob
! File "C:\Perl58\lib\auto\File\Glob\*"
SetOutPath $INSTDIR\auto\MIME\Base64
! File "C:\Perl58\lib\auto\MIME\Base64\*"
SetOutPath $INSTDIR\auto\IO
! File "C:\Perl58\lib\auto\IO\*"
SetOutPath $INSTDIR\auto\Socket
! File "C:\Perl58\lib\auto\Socket\*"
SetOutPath $INSTDIR\auto\Sys\Hostname
! File "C:\Perl58\lib\auto\Sys\Hostname\*"
SetOutPath $INSTDIR\auto\POSIX
! File "C:\Perl58\lib\auto\POSIX\POSIX.dll"
! File "C:\Perl58\lib\auto\POSIX\autosplit.ix"
! File "C:\Perl58\lib\auto\POSIX\load_imports.al"
SetOutPath $INSTDIR\File
! File "C:\Perl58\lib\File\Glob.pm"
SetOutPath $INSTDIR\warnings
! File "C:\Perl58\lib\warnings\register.pm"
; Create the uninstall program BEFORE creating the shortcut to it
--- 317,399 ----
SetOutPath $INSTDIR
! File "C:\Perl\bin\perl.exe"
! File "C:\Perl\bin\wperl.exe"
! File "C:\Perl\bin\perl58.dll"
! File "C:\Perl\lib\AutoLoader.pm"
! File "C:\Perl\lib\Carp.pm"
! File "C:\Perl\lib\Config.pm"
! File "C:\Perl\lib\DynaLoader.pm"
! File "C:\Perl\lib\Errno.pm"
! File "C:\Perl\lib\Exporter.pm"
! File "C:\Perl\lib\IO.pm"
! File "C:\Perl\lib\integer.pm"
! File "C:\Perl\lib\locale.pm"
! File "C:\Perl\lib\POSIX.pm"
! File "C:\Perl\lib\SelectSaver.pm"
! File "C:\Perl\lib\Socket.pm"
! File "C:\Perl\lib\strict.pm"
! File "C:\Perl\lib\Symbol.pm"
! File "C:\Perl\lib\vars.pm"
! File "C:\Perl\lib\warnings.pm"
! File "C:\Perl\lib\XSLoader.pm"
SetOutPath $INSTDIR\Carp
! File "C:\Perl\lib\Carp\*"
SetOutPath $INSTDIR\Exporter
! File "C:\Perl\lib\Exporter\*"
SetOutPath $INSTDIR\MIME
! File "C:\Perl\lib\MIME\*"
SetOutPath $INSTDIR\Win32
! File "C:\Perl\site\lib\Win32\API.pm"
SetOutPath $INSTDIR\Win32\API
! File "C:\Perl\site\lib\Win32\API\*.pm"
SetOutPath $INSTDIR\auto\Win32\API
! File "C:\Perl\site\lib\auto\Win32\API\*"
SetOutPath $INSTDIR\IO
! File "C:\Perl\lib\IO\*"
SetOutPath $INSTDIR\Sys
! File "C:\Perl\lib\Sys\*"
SetOutPath $INSTDIR\Text
! File "C:\Perl\lib\Text\ParseWords.pm"
SetOutPath $INSTDIR\IO\Socket
! File "C:\Perl\lib\IO\Socket\*"
SetOutPath $INSTDIR\auto\DynaLoader
! File "C:\Perl\lib\auto\DynaLoader\*"
SetOutPath $INSTDIR\auto\File\Glob
! File "C:\Perl\lib\auto\File\Glob\*"
SetOutPath $INSTDIR\auto\MIME\Base64
! File "C:\Perl\lib\auto\MIME\Base64\*"
SetOutPath $INSTDIR\auto\IO
! File "C:\Perl\lib\auto\IO\*"
SetOutPath $INSTDIR\auto\Socket
! File "C:\Perl\lib\auto\Socket\*"
SetOutPath $INSTDIR\auto\Sys\Hostname
! File "C:\Perl\lib\auto\Sys\Hostname\*"
SetOutPath $INSTDIR\auto\POSIX
! File "C:\Perl\lib\auto\POSIX\POSIX.dll"
! File "C:\Perl\lib\auto\POSIX\autosplit.ix"
! File "C:\Perl\lib\auto\POSIX\load_imports.al"
SetOutPath $INSTDIR\File
! File "C:\Perl\lib\File\Glob.pm"
SetOutPath $INSTDIR\warnings
! File "C:\Perl\lib\warnings\register.pm"
; Create the uninstall program BEFORE creating the shortcut to it
|
|
From: <jgr...@us...> - 2003-06-09 18:34:39
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv21620/UI
Modified Files:
HTTP.pm
Log Message:
Remove log statements
Index: HTTP.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTTP.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** HTTP.pm 30 May 2003 20:52:32 -0000 1.5
--- HTTP.pm 9 Jun 2003 18:34:36 -0000 1.6
***************
*** 108,117 ****
if ( ( defined( $ready ) ) && ( $ready == $self->{server_} ) ) {
- $self->log_( "Connection pending on HTTP socket" );
-
if ( my $client = $self->{server_}->accept() ) {
- $self->log_( "Accepted connection on HTTP socket" );
-
# Check that this is a connection from the local machine, if it's not then we drop it immediately
# without any further processing. We don't want to allow remote users to admin POPFile
--- 108,113 ----
***************
*** 119,129 ****
my ( $remote_port, $remote_host ) = sockaddr_in( $client->peername() );
- $self->log_( "Got a connection from " . inet_ntoa( $remote_host ) . " on port $remote_port" );
-
if ( ( $self->config_( 'local' ) == 0 ) ||
( $remote_host eq inet_aton( "127.0.0.1" ) ) ) {
- $self->log_( "Ready to receive HTTP command" );
-
# Read the request line (GET or POST) from the client and if we manage to do that
# then read the rest of the HTTP headers grabbing the Content-Length and using
--- 115,121 ----
***************
*** 136,141 ****
my $content;
- $self->log_( "Received HTTP command $request" );
-
while ( <$client> ) {
$content_length = $1 if ( /Content-Length: (\d+)/i );
--- 128,131 ----
***************
*** 143,148 ****
}
- $self->log_( "Content length $content_length" );
-
if ( $content_length > 0 ) {
$content = '';
--- 133,136 ----
***************
*** 224,229 ****
while ( $arguments =~ m/\G(.*?)=(.*?)(&|\r|\n|$)/g ) {
my $arg = $1;
- $self->{form_}{$arg} = $2;
$self->{form_}{$arg} =~ s/\+/ /g;
--- 212,217 ----
while ( $arguments =~ m/\G(.*?)=(.*?)(&|\r|\n|$)/g ) {
my $arg = $1;
+ $self->{form_}{$arg} = $2;
$self->{form_}{$arg} =~ s/\+/ /g;
|
|
From: <jgr...@us...> - 2003-06-09 18:33:39
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21196/Classifier
Modified Files:
MailParse.pm
Log Message:
Prevent duplicate call to add_url when parsing img tags, prevent spaces in charset decodes
Index: MailParse.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/MailParse.pm,v
retrieving revision 1.131
retrieving revision 1.132
diff -C2 -d -r1.131 -r1.132
*** MailParse.pm 29 May 2003 10:49:06 -0000 1.131
--- MailParse.pm 9 Jun 2003 18:33:36 -0000 1.132
***************
*** 447,450 ****
--- 447,452 ----
}
}
+
+ next;
}
***************
*** 536,540 ****
if ( ( $attribute =~ /^content$/i ) && ( $tag =~ /^meta$/i ) ) {
! if ( $value=~ /charset=(.{1,40})[\"\>]?/ ) {
update_word( $self, $1, $encoded, '', '', '' );
}
--- 538,542 ----
if ( ( $attribute =~ /^content$/i ) && ( $tag =~ /^meta$/i ) ) {
! if ( $value=~ /charset=([^ ]{1,40})[\"\>]?/ ) {
update_word( $self, $1, $encoded, '', '', '' );
}
***************
*** 621,624 ****
--- 623,628 ----
$authinfo = $1 if ( $url =~ s/^(([[:alpha:]0-9\-_\.\;\:\&\=\+\$\,]+)(\@|\%40))+// );
+ $self->update_pseudoword( 'html', 'authorization', $encoded, $oldurl ) if ( defined( $authinfo ) && ( $authinfo ne '' ) );
+
if ( $url =~ s/^(([[:alpha:]0-9\-_]+\.)+)(com|edu|gov|int|mil|net|org|aero|biz|coop|info|museum|name|pro|[[:alpha:]]{2})([^[:alpha:]0-9\-_\.]|$)/$4/i ) {
$host = "$1$3";
***************
*** 1021,1025 ****
# Look for =?foo? syntax that identifies a charset
! if ( $line =~ /=\?(.{1,40})\?/ ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
--- 1025,1029 ----
# Look for =?foo? syntax that identifies a charset
! if ( $line =~ /=\?([^ ]{1,40})\?/ ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
***************
*** 1192,1196 ****
# Check the encoding type in all RFC 2047 encoded headers
! if ( $argument =~ /=\?(.{1,40})\?(Q|B)/i ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
--- 1196,1200 ----
# Check the encoding type in all RFC 2047 encoded headers
! if ( $argument =~ /=\?([^ ]{1,40})\?(Q|B)/i ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
***************
*** 1215,1219 ****
$argument = $self->decode_string( $argument );
! if ( $argument =~ /=\?(.{1,40})\?/ ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
--- 1219,1223 ----
$argument = $self->decode_string( $argument );
! if ( $argument =~ /=\?([^ ]{1,40})\?/ ) {
update_word( $self, $1, 0, '', '', 'charset' );
}
***************
*** 1260,1264 ****
if ( $header =~ /^Content-Type$/i ) {
! if ( $argument =~ /charset=\"?([^\"]{1,40})\"?/ ) {
update_word( $self, $1, 0, '' , '', 'charset' );
}
--- 1264,1268 ----
if ( $header =~ /^Content-Type$/i ) {
! if ( $argument =~ /charset=\"?([^\" ]{1,40})\"?/ ) {
update_word( $self, $1, 0, '' , '', 'charset' );
}
|
|
From: <jgr...@us...> - 2003-06-09 18:33:13
|
Update of /cvsroot/popfile/engine/Classifier
In directory sc8-pr-cvs1:/tmp/cvs-serv21085/Classifier
Modified Files:
Bayes.pm
Log Message:
Add code to check for bad entries in the corpus and ignore them
Index: Bayes.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Classifier/Bayes.pm,v
retrieving revision 1.148
retrieving revision 1.149
diff -C2 -d -r1.148 -r1.149
*** Bayes.pm 3 Jun 2003 08:27:10 -0000 1.148
--- Bayes.pm 9 Jun 2003 18:33:10 -0000 1.149
***************
*** 464,471 ****
}
! if ( /([^\s]+) (\d+)/ ) {
my $word = $1;
my $value = $2;
- $value =~ s/[\r\n]//g;
if ( $value > 0 ) {
$self->{total__}{$bucket} += $value;
--- 464,472 ----
}
! s/[\r\n]//g;
!
! if ( /^([^\s]+) (\d+)$/ ) {
my $word = $1;
my $value = $2;
if ( $value > 0 ) {
$self->{total__}{$bucket} += $value;
***************
*** 473,476 ****
--- 474,479 ----
set_value_( $self, $bucket, $word, $value );
}
+ } else {
+ $self->log_( "Found entry in corpus for $bucket that looks wrong: \"$_\" (ignoring)" );
}
}
***************
*** 1355,1362 ****
}
! if ( /([^\s]+) (\d+)/ ) {
my $word = $1;
my $value = $2;
- $value =~ s/[\r\n]//g;
if ( $value > 0 ) {
$words{$word} = $value;
--- 1358,1366 ----
}
! s/[\r\n]//g;
!
! if ( /^([^\s]+) (\d+)$/ ) {
my $word = $1;
my $value = $2;
if ( $value > 0 ) {
$words{$word} = $value;
***************
*** 1413,1420 ****
}
! if ( /([^\s]+) (\d+)/ ) {
my $word = $1;
my $value = $2;
- $value =~ s/[\r\n]//g;
if ( $value > 0 ) {
$words{$word} = $value;
--- 1417,1425 ----
}
! s/[\r\n]//g;
!
! if ( /^([^\s]+) (\d+)$/ ) {
my $word = $1;
my $value = $2;
if ( $value > 0 ) {
$words{$word} = $value;
|
|
From: <jgr...@us...> - 2003-06-09 18:32:46
|
Update of /cvsroot/popfile/engine In directory sc8-pr-cvs1:/tmp/cvs-serv20939 Modified Files: Makefile Log Message: Added help Index: Makefile =================================================================== RCS file: /cvsroot/popfile/engine/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Makefile 20 May 2003 19:58:55 -0000 1.9 --- Makefile 9 Jun 2003 18:32:43 -0000 1.10 *************** *** 12,15 **** --- 12,21 ---- error: @echo Must specify one of test, package or windows + @echo + @echo "test - Run POPFile test suite" + @echo "windows - Build Windows installer" + @echo "package - Build Windows installer, and create" + @echo " ZIP files for Windows and cross-platform" + @echo " version" # test runs the POPFile unit test suite |
|
From: <jgr...@us...> - 2003-06-09 18:32:18
|
Update of /cvsroot/popfile/engine/POPFile
In directory sc8-pr-cvs1:/tmp/cvs-serv20766/POPFile
Modified Files:
Module.pm
Log Message:
Nothing changed
Index: Module.pm
===================================================================
RCS file: /cvsroot/popfile/engine/POPFile/Module.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Module.pm 30 May 2003 19:39:18 -0000 1.8
--- Module.pm 9 Jun 2003 18:32:10 -0000 1.9
***************
*** 6,411 ****
#
#----------------------------------------------------------------------------
!
! package POPFile::Module;
!
! # ---------------------------------------------------------------------------------------------
! #
! # This module implements the base class for all POPFile Loadable Modules and
! # contains collection of methods that are common to all POPFile modules and only
! # selected ones need be overriden by subclasses
! #
! # POPFile is constructed from a collection of classes which all have special
! # PUBLIC interface functions:
! #
! # initialize() - called after the class is created to set default values for internal
! # variables and global configuration information
! #
! # start() - called once all configuration has been read and POPFile is ready to start
! # operating
! #
! # stop() - called when POPFile is shutting down
! #
! # service() - called by the main POPFile process to allow a submodule to do its own
! # work (this is optional for modules that do not need to perform any service)
! #
! # prefork() - called when a module has requested a fork, but before the fork happens
! #
! # forked() - called when a module has forked the process. This is called within the child
! # process and should be used to clean up
! #
! # reaper() - called when a process has terminated to give a module a chance to do
! # whatever clean up is needed
! #
! # name() - returns a simple name for the module by which other modules can get access
! # through the %components hash. The name returned here will be the name
! # used as the key for this module in %components
! #
! # The following methods are PROTECTED and should be accessed by sub classes:
! #
! # log_() - sends a string to the logger
! #
! # config_() - gets or sets a configuration parameter for this module
! #
! # A note on the naming
! #
! # A method or variable that ends with an underscore is PROTECTED and should not be accessed
! # from outside the class (or subclass; in C++ its protected), to access a PROTECTED variable
! # you will find an equivalent getter/setter method with no underscore.
! #
! # Truly PRIVATE variables are indicated by a double underscore at the end of the name and
! # should not be accessed outside the class without going through a getter/setter and may
! # not be directly accessed by a subclass.
! #
! # For example
! #
! # $c->foo__() is a private method
! # $c->{foo__} is a private variable
! # $c->foo_() is a protected method
! # $c->{foo_} is a protected variable
! # $c->foo() is a public method that modifies $c->{foo_} it always returns the current
! # value of the variable it is referencing and if passed a value sets that corresponding
! # variable
! #
! # Copyright (c) 2001-2003 John Graham-Cumming
! #
! # ---------------------------------------------------------------------------------------------
!
! #----------------------------------------------------------------------------
! # new
! #
! # Class new() function, all real work gets done by initialize and
! # the things set up here are more for documentation purposes than
! # anything so that you know that they exists
! #
! #----------------------------------------------------------------------------
! sub new
! {
! my $type = shift;
! my $self;
!
! # A reference to the POPFile::Configuration module, every module is
! # able to get configuration information through this, note that it
! # is valid when initialize is called, however, the configuration is not
! # read from disk until after initialize has been called
!
! $self->{configuration__} = 0; # PRIVATE
!
! # A reference to the POPFile::Logger module
!
! $self->{logger__} = 0; # PRIVATE
!
! # The name of this module
!
! $self->{name__} = ''; # PRIVATE
!
! # Used to tell any loops to terminate
!
! $self->{alive_} = 1;
!
! # This is a reference to the pipeready() function in popfile.pl that it used
! # to determine if a pipe is ready for reading in a cross platform way
!
! $self->{pipeready_} = 0;
!
! # This is a reference to a function (forker) in popfile.pl that performs a fork
! # and informs modules that a fork has occurred
!
! $self->{forker_} = 0;
!
! return bless $self, $type;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # initialize
! #
! # Called to initialize the module, the main task that this function should perform is
! # setting up the default values of the configuration options for this object. This is done
! # through the configuration_ hash value that will point the configuration module.
! #
! # Note that the configuration is not loaded from disk until after every module's initialize
! # has been called, so do not use any of these values until start() is called as they may
! # change
! #
! # The method should return 1 to indicate that it initialized correctly, if it returns
! # 0 then POPFile will abort loading immediately
! #
! # ---------------------------------------------------------------------------------------------
! sub initialize
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # start
! #
! # Called when all configuration information has been loaded from disk.
! #
! # The method should return 1 to indicate that it started correctly, if it returns
! # 0 then POPFile will abort loading immediately
! #
! # ---------------------------------------------------------------------------------------------
! sub start
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # stop
! #
! # Called when POPFile is closing down, this is the last method that will get called before
! # the object is destroyed. There is not return value from stop().
! #
! # ---------------------------------------------------------------------------------------------
! sub stop
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # reaper
! #
! # Called when a child process terminates somewhere in POPFile. The object should check
! # to see if it was one of its children and do any necessary processing by calling waitpid()
! # on any child handles it has
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub reaper
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # service
! #
! # service() is a called periodically to give the module a chance to do housekeeping work.
! #
! # If any problem occurs that requires POPFile to shutdown service() should return 0 and
! # the top level process will gracefully terminate POPFile including calling all stop()
! # methods. In normal operation return 1.
! #
! # ---------------------------------------------------------------------------------------------
! sub service
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # prefork
! #
! # This is called when some module is about to fork POPFile
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub prefork
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # forked
! #
! # This is called when some module forks POPFile and is within the context of the child
! # process so that this module can close any duplicated file handles that are not needed.
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub forked
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # log_
! #
! # Called by a subclass to send a message to the logger, the logged message will be prefixed
! # by the name of the module in use
! #
! # $message The message to log
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub log_
! {
! my ( $self, $message ) = @_;
!
! $self->{logger__}->debug( $self->{name__} . ': ' . $message );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # config_
! #
! # Called by a subclass to get or set a configuration parameter
! #
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $name then config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub config_
! {
! my ( $self, $name, $value ) = @_;
!
! return $self->module_config_( $self->{name__}, $name, $value );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # global_config_
! #
! # Called by a subclass to get or set a global (i.e. not module specific) configuration parameter
! #
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $name then global_config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub global_config_
! {
! my ( $self, $name, $value ) = @_;
!
! return $self->module_config_( 'GLOBAL', $name, $value );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # module_config_
! #
! # Called by a subclass to get or set a module specific configuration parameter
! #
! # $module The name of the module that owns the parameter (e.g. 'pop3')
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $module and $name then module_config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub module_config_
! {
! my ( $self, $module, $name, $value ) = @_;
!
! return $self->{configuration__}->parameter( $module . "_" . $name, $value );
! }
!
! # GETTER/SETTER methods. Note that I do not expect documentation of these unless they
! # are non-trivial since the documentation would be a waste of space
! #
! # The only thing to note is the idiom used, stick to that and there's no need to
! # document these
! #
! # sub foo
! # {
! # my ( $self, $value ) = @_;
! #
! # if ( defined( $value ) ) {
! # $self->{foo_} = $value;
! # }
! #
! # return $self->{foo_};
! # }
! #
! # This method access the foo_ variable for reading or writing, $c->foo() read foo_ and
! # $c->foo( 'foo' ) writes foo_
!
! sub configuration
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{configuration__} = $value;
! }
!
! return $self->{configuration__};
! }
!
! sub forker
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{forker_} = $value;
! }
!
! return $self->{forker_};
! }
!
! sub logger
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{logger__} = $value;
! }
!
! return $self->{logger__};
! }
!
! sub pipeready
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{pipeready_} = $value;
! }
!
! return $self->{pipeready_};
! }
!
! sub alive
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{alive_} = $value;
! }
!
! return $self->{alive_};
! }
!
! sub name
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{name__} = $value;
! }
!
! return $self->{name__};
! }
!
! sub version
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{version_} = $value;
! }
!
! return $self->{version_};
! }
!
! 1;
--- 6,418 ----
#
#----------------------------------------------------------------------------
!
! package POPFile::Module;
!
! # ---------------------------------------------------------------------------------------------
! #
! # This module implements the base class for all POPFile Loadable Modules and
! # contains collection of methods that are common to all POPFile modules and only
! # selected ones need be overriden by subclasses
! #
! # POPFile is constructed from a collection of classes which all have special
! # PUBLIC interface functions:
! #
! # initialize() - called after the class is created to set default values for internal
! # variables and global configuration information
! #
! # start() - called once all configuration has been read and POPFile is ready to start
! # operating
! #
! # stop() - called when POPFile is shutting down
! #
! # service() - called by the main POPFile process to allow a submodule to do its own
! # work (this is optional for modules that do not need to perform any service)
! #
! # prefork() - called when a module has requested a fork, but before the fork happens
! #
! # forked() - called when a module has forked the process. This is called within the child
! # process and should be used to clean up
! #
! # reaper() - called when a process has terminated to give a module a chance to do
! # whatever clean up is needed
! #
! # name() - returns a simple name for the module by which other modules can get access
! # through the %components hash. The name returned here will be the name
! # used as the key for this module in %components
! #
! # The following methods are PROTECTED and should be accessed by sub classes:
! #
! # log_() - sends a string to the logger
! #
! # config_() - gets or sets a configuration parameter for this module
! #
! # A note on the naming
! #
! # A method or variable that ends with an underscore is PROTECTED and should not be accessed
! # from outside the class (or subclass; in C++ its protected), to access a PROTECTED variable
! # you will find an equivalent getter/setter method with no underscore.
! #
! # Truly PRIVATE variables are indicated by a double underscore at the end of the name and
! # should not be accessed outside the class without going through a getter/setter and may
! # not be directly accessed by a subclass.
! #
! # For example
! #
! # $c->foo__() is a private method
! # $c->{foo__} is a private variable
! # $c->foo_() is a protected method
! # $c->{foo_} is a protected variable
! # $c->foo() is a public method that modifies $c->{foo_} it always returns the current
! # value of the variable it is referencing and if passed a value sets that corresponding
! # variable
! #
! # Copyright (c) 2001-2003 John Graham-Cumming
! #
! # ---------------------------------------------------------------------------------------------
!
! #----------------------------------------------------------------------------
! # new
! #
! # Class new() function, all real work gets done by initialize and
! # the things set up here are more for documentation purposes than
! # anything so that you know that they exists
! #
! #----------------------------------------------------------------------------
! sub new
! {
! my $type = shift;
! my $self;
!
! # A reference to the POPFile::Configuration module, every module is
! # able to get configuration information through this, note that it
! # is valid when initialize is called, however, the configuration is not
! # read from disk until after initialize has been called
!
! $self->{configuration__} = 0; # PRIVATE
!
! # A reference to the POPFile::Logger module
!
! $self->{logger__} = 0; # PRIVATE
!
! # The name of this module
!
! $self->{name__} = ''; # PRIVATE
!
! # Used to tell any loops to terminate
!
! $self->{alive_} = 1;
!
! # This is a reference to the pipeready() function in popfile.pl that it used
! # to determine if a pipe is ready for reading in a cross platform way
!
! $self->{pipeready_} = 0;
!
! # This is a reference to a function (forker) in popfile.pl that performs a fork
! # and informs modules that a fork has occurred
!
! $self->{forker_} = 0;
!
! return bless $self, $type;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # initialize
! #
! # Called to initialize the module, the main task that this function should perform is
! # setting up the default values of the configuration options for this object. This is done
! # through the configuration_ hash value that will point the configuration module.
! #
! # Note that the configuration is not loaded from disk until after every module's initialize
! # has been called, so do not use any of these values until start() is called as they may
! # change
! #
! # The method should return 1 to indicate that it initialized correctly, if it returns
! # 0 then POPFile will abort loading immediately
! #
! # ---------------------------------------------------------------------------------------------
! sub initialize
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # start
! #
! # Called when all configuration information has been loaded from disk.
! #
! # The method should return 1 to indicate that it started correctly, if it returns
! # 0 then POPFile will abort loading immediately
! #
! # ---------------------------------------------------------------------------------------------
! sub start
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # stop
! #
! # Called when POPFile is closing down, this is the last method that will get called before
! # the object is destroyed. There is not return value from stop().
! #
! # ---------------------------------------------------------------------------------------------
! sub stop
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # reaper
! #
! # Called when a child process terminates somewhere in POPFile. The object should check
! # to see if it was one of its children and do any necessary processing by calling waitpid()
! # on any child handles it has
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub reaper
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # service
! #
! # service() is a called periodically to give the module a chance to do housekeeping work.
! #
! # If any problem occurs that requires POPFile to shutdown service() should return 0 and
! # the top level process will gracefully terminate POPFile including calling all stop()
! # methods. In normal operation return 1.
! #
! # ---------------------------------------------------------------------------------------------
! sub service
! {
! my ( $self ) = @_;
!
! return 1;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # prefork
! #
! # This is called when some module is about to fork POPFile
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub prefork
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # forked
! #
! # This is called when some module forks POPFile and is within the context of the child
! # process so that this module can close any duplicated file handles that are not needed.
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub forked
! {
! my ( $self ) = @_;
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # log_
! #
! # Called by a subclass to send a message to the logger, the logged message will be prefixed
! # by the name of the module in use
! #
! # $message The message to log
! #
! # There is no return value from this method
! #
! # ---------------------------------------------------------------------------------------------
! sub log_
! {
! my ( $self, $message ) = @_;
!
! $self->{logger__}->debug( $self->{name__} . ': ' . $message );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # config_
! #
! # Called by a subclass to get or set a configuration parameter
! #
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $name then config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub config_
! {
! my ( $self, $name, $value ) = @_;
!
! return $self->module_config_( $self->{name__}, $name, $value );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # global_config_
! #
! # Called by a subclass to get or set a global (i.e. not module specific) configuration parameter
! #
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $name then global_config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub global_config_
! {
! my ( $self, $name, $value ) = @_;
!
! return $self->module_config_( 'GLOBAL', $name, $value );
! }
!
! # ---------------------------------------------------------------------------------------------
! #
! # module_config_
! #
! # Called by a subclass to get or set a module specific configuration parameter
! #
! # $module The name of the module that owns the parameter (e.g. 'pop3')
! # $name The name of the parameter (e.g. 'port')
! # $value (optional) The value to set
! #
! # If called with just a $module and $name then module_config_() will return the current value
! # of the configuration parameter.
! #
! # ---------------------------------------------------------------------------------------------
! sub module_config_
! {
! my ( $self, $module, $name, $value ) = @_;
!
! return $self->{configuration__}->parameter( $module . "_" . $name, $value );
! }
!
! # GETTER/SETTER methods. Note that I do not expect documentation of these unless they
! # are non-trivial since the documentation would be a waste of space
! #
! # The only thing to note is the idiom used, stick to that and there's no need to
! # document these
! #
! # sub foo
! # {
! # my ( $self, $value ) = @_;
! #
! # if ( defined( $value ) ) {
! # $self->{foo_} = $value;
! # }
! #
! # return $self->{foo_};
! # }
! #
! # This method access the foo_ variable for reading or writing, $c->foo() read foo_ and
! # $c->foo( 'foo' ) writes foo_
!
! sub configuration
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{configuration__} = $value;
! }
!
! return $self->{configuration__};
! }
!
! sub forker
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{forker_} = $value;
! }
!
! return $self->{forker_};
! }
!
! sub logger
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{logger__} = $value;
! }
!
! return $self->{logger__};
! }
!
! sub pipeready
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{pipeready_} = $value;
! }
!
! return $self->{pipeready_};
! }
!
! sub alive
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{alive_} = $value;
! }
!
! return $self->{alive_};
! }
!
! sub name
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{name__} = $value;
! }
!
! return $self->{name__};
! }
!
! sub version
! {
! my ( $self, $value ) = @_;
!
! if ( defined( $value ) ) {
! $self->{version_} = $value;
! }
!
! return $self->{version_};
! }
!
! sub last_ten_log_entries
! {
! my ( $self ) = @_;
!
! return $self->{logger__}->last_ten();
! }
!
! 1;
|