🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Kikutani Makoto Wed, 02 Jul 1997 00:00
slrn score article which has no specific header
#34817
Author: Kikutani Makoto
Date: Wed, 02 Jul 1997 00:00
20 lines
1022 bytes
I want to score articles which don't have "charset=iso-2022-jp"
in Content-Type header. I wrote my Score as follows:

[fj.*]
Score: -1
	~Content-Type: charset=iso-2022-jp


This scores correctly articles which has Content-Type header
AND its charset isn't "iso-2022-jp" (ex. us-ascii).
But it doesn't score articles which have no Content-Type:.

Any idea ?

-- 
Kikutani Makoto  kikutani@eis.or.jp kikutani@jdc.ericsson.se
hgf03701@niftyserve.or.jp  http://www.eis.or.jp/muse/kikutani/

Re: slrn score article which has no specific header
#34793
Author: Rocco Caputo
Date: Wed, 02 Jul 1997 00:00
29 lines
1302 bytes
Would something like this be faster?

[fj.*]
Score: -1
    % tilde here negates header test, yes?
    ~Content-Type: charset=iso-2022-jp

-- 
Rocco
<troc@shadow.net>

On 2 Jul 1997 19:07:40 GMT, Pardoz <pardoz@io.com> wrote:
>On 2 Jul 1997 07:06:54 GMT, Kikutani Makoto <kikutani@jdc.ericsson.se> wrote:
>
>>I want to score articles which don't have "charset=iso-2022-jp"
>>in Content-Type header.
>
>     You could try doing it the other way around:
>[fj.*]
>Score: 1
>Content-Type: Content-Type: charset=iso-2022-jp
>
>[fj.*]
>Score: -1
>Subject: .


Re: slrn score article which has no specific header
#34796
Author: John E. Davis
Date: Wed, 02 Jul 1997 00:00
34 lines
1455 bytes
On 2 Jul 1997 07:06:54 GMT, Kikutani Makoto <kikutani@jdc.ericsson.se>
wrote:
>But it doesn't score articles which have no Content-Type:.

Does this patch solve the problem?  If so, I will include it in
0.9.4.2, which I intend to release this weekend.

--- ../../release/slrn/src/score.c	Fri Jun 20 18:02:47 1997
+++ score.c	Wed Jul  2 15:52:12 1997
@@ -239,6 +239,16 @@
 	     
 	     if (s == NULL)
 	       {
+		  if (srt->not_flag)
+		    {
+		       /* Match */
+		       if (or_type)
+			 break;
+		       
+		       goto next_srt;
+		    }
+		  
+		  /* Match failed */
 		  if (or_type) goto next_srt;
 		  break;
 	       }

-- 
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: slrn score article which has no specific header
#34797
Author: John E. Davis
Date: Wed, 02 Jul 1997 00:00
17 lines
1227 bytes
On 2 Jul 1997 07:06:54 GMT, Kikutani Makoto <kikutani@jdc.ericsson.se>
wrote:
>	~Content-Type: charset=iso-2022-jp
>
>This scores correctly articles which has Content-Type header
>AND its charset isn't "iso-2022-jp" (ex. us-ascii).
>But it doesn't score articles which have no Content-Type:.

Someone else pointed this out to me.  I will make a change in 0.9.4.2
which will regard ~Header as TRUE if Header does not exist.
-- 
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: slrn score article which has no specific header
#34803
Author: Pardoz
Date: Wed, 02 Jul 1997 00:00
26 lines
1277 bytes
On 2 Jul 1997 07:06:54 GMT, Kikutani Makoto <kikutani@jdc.ericsson.se> wrote:

>I want to score articles which don't have "charset=iso-2022-jp"
>in Content-Type header.

[snip]

     You could try doing it the other way around.  Something like
[fj.*]
Score: 1
Content-Type: Content-Type: charset=iso-2022-jp

[fj.*]
Score: -1
Subject: .

     would probably do it.

-- 
RIOT, n.  A popular entertainment given to the military by innocent 
bystanders.	       (A. Bierce, _The Devil's Dictionary_)
http://www.io.com/~pardoz (Liaden Universe mailing list home page)
http://www.io.com/~pardoz/mythos.html (Mythos Adventure Archive)

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