🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by Dr Ivan D Reid, muSR Facility Sat, 27 Jul 1996 00:00
Scoring by date in slrn
#24475
Author: Dr Ivan D Reid, muSR Facility
Date: Sat, 27 Jul 1996 00:00
25 lines
1438 bytes
	Is it possible to score by date in slrn?  Our news-server was down
for two weeks and is now catching up all the old articles from its feed.
I was able to follow a few high-volume groups from another account so I
don't want to read things twice.  Unfortunately the articles are appearing
all jumbled together so it's hard to sort the wheat from the chaff.

	score.txt says " Although the score may be based on ANY header
item,...", but after putting in a scoring section with 

[rec.*]
Score: -9999
Expires: 14-8-1996
	Date: 15

I still see messages from 15 July in rec.motorcycles.  Is this not possible,
or am I making some fundamental blunder.  (Machine is a VAXstation 4000-60;
VMS 5.6 -- I had to change some print/scan formats in score.c as the C
compiler doesn't support the "u" format descriptor.)

-- 
Ivan Reid, Paul Scherrer Institute, CH.     			reid@psi.ch


Re: Scoring by date in slrn
#24481
Author: John E. Davis
Date: Sat, 27 Jul 1996 00:00
62 lines
2340 bytes
On 27 Jul 1996 15:31:30 GMT, Dr Ivan D Reid, muSR Facility <reid@psi.ch>
wrote:
 : 	Is it possible to score by date in slrn?  Our news-server was down
 
Yes.  Apply the patch which I have attached to this message.

 : [rec.*]
 : Score: -9999
 : Expires: 14-8-1996
 : 	Date: 15
 : 
 : I still see messages from 15 July in rec.motorcycles.  Is this not possible,

This score will only kill articles with `15' in the date field.  You
may want to use something such as:

  [rec.*]
  Score: -9999
  Expires: 14-8-1996
  	Date: \<[01]?[0-9]\>

Here is the patch to be applied to score.c:

--- src/slrn/src/score.c~	Wed Jul 24 01:18:20 1996
+++ src/slrn/src/score.c	Sat Jul 27 15:57:49 1996
@@ -49,6 +49,7 @@
 #define SCORE_REFERENCES 5
 #define SCORE_LINES 6
 #define SCORE_MESSAGE_ID 7
+#define SCORE_DATE 8
    /* generic requires extra server interaction */
 #define SCORE_GENERIC 16
    unsigned int flags;
@@ -166,6 +167,10 @@
 		  s = h->from;
 		  break;
 		  
+		case SCORE_DATE:
+		  s = h->date;
+		  break;
+
 		case SCORE_MESSAGE_ID:
 		  s = h->msgid;
 		  break;
@@ -872,6 +877,8 @@
 	  add_group_regexp (pst, lp + 10, lp, SCORE_REFERENCES, not_flag);
 	else if (!strncmp ((char *)lp, "Lines:", 6))
 	  add_group_regexp (pst, lp + 5, lp, SCORE_LINES, not_flag);
+	else if (!strncmp ((char *)lp, "Date:", 5))
+	  add_group_regexp (pst, lp + 5, lp, SCORE_DATE, not_flag);
 	else if (!strncmp ((char *)lp, "Message-Id:", 11))
 	  add_group_regexp (pst, lp + 10, lp, SCORE_MESSAGE_ID, not_flag);
 	else

-- 
John E. Davis                   Center for Space Research/AXAF Science Center
617-258-8119                    MIT 37-662c, Cambridge, MA 02139
http://space.mit.edu/~davis


Re: Scoring by date in slrn
#24498
Author: Dr Ivan D Reid, muSR Facility
Date: Sun, 28 Jul 1996 00:00
27 lines
1415 bytes
In article <slrn4vktl0.qlb.davis@aluche.mit.edu>, John E. Davis wrote:
>On 27 Jul 1996 15:31:30 GMT, Dr Ivan D Reid, muSR Facility <reid@psi.ch>
>wrote:
> : 	Is it possible to score by date in slrn?  Our news-server was down

>Yes.  Apply the patch which I have attached to this message.

...

>This score will only kill articles with `15' in the date field.  You
>may want to use something such as:

>  [rec.*]
>  Score: -9999
>  Expires: 14-8-1996
>  	Date: \<[01]?[0-9]\>

	Thanks for the quick reply, John.  Applying the patch and a few
educated guesses about the above entry I killed 2950 of 3300 entries in
r.m.  Yay!  I'll have to learn about UNIX regular expressions sometime...

-- 
Ivan Reid, Paul Scherrer Institute, CH.     			reid@psi.ch


Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads