🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
5 messages
5 total messages Started by Mike Mckinney Fri, 19 Nov 1999 00:00
Score file log for slrn ?
#54312
Author: Mike Mckinney
Date: Fri, 19 Nov 1999 00:00
11 lines
931 bytes
Sometime back, for a previous version of slrn, someone wrote a patch to have
slrn generate a Score file log.
Does anyone know if such a patch is available for current versions of slrn ?

TIA

-- 
mikemck@austin.rr.com


Re: Score file log for slrn ? -> man diff
#54393
Author: Mike Mckinney
Date: Mon, 22 Nov 1999 00:00
19 lines
1425 bytes
Sven Guckes <guckes@math.fu-berlin.de> wrote:
>* Mike Mckinney <mike@mike.local.net>:
>> Sometime back, for a previous version of slrn, someone
>> wrote a patch to have slrn generate a Score file log.
>> Does anyone know if such a patch is
>> available for current versions of slrn ?
>
>Well, what would that patch do other than using "diff"?

I'm not sure what your asking. At any rate, my wife updated the patch for me.
I just like to have a log of what slrn is killing, so I can make sure I'm
getting the right posts, and not regularly missing informative or interesting
posts.

-- 
mikemck@austin.rr.com


Re: Score file log for slrn ? -> man diff
#54413
Author: Sven Guckes
Date: Mon, 22 Nov 1999 00:00
11 lines
974 bytes
* Mike Mckinney <mike@mike.local.net>:
> Sometime back, for a previous version of slrn, someone
> wrote a patch to have slrn generate a Score file log.
> Does anyone know if such a patch is
> available for current versions of slrn ?

Well, what would that patch do other than using "diff"?

Sven

Re: Score file log for slrn ? -> man diff
#54431
Author: Sven Guckes
Date: Mon, 22 Nov 1999 00:00
22 lines
1695 bytes
* Mike Mckinney <mike@mike.local.net>:
> >> Sometime back, for a previous version of slrn, someone
> >> wrote a patch to have slrn generate a Score file log.
> >> Does anyone know if such a patch is
> >> available for current versions of slrn ?
> >Well, what would that patch do other than using "diff"?
> I'm not sure what your asking. At any rate, my wife updated the
> patch for me.  I just like to have a log of what slrn is killing,
> so I can make sure I'm getting the right posts, and not
> regularly missing informative or interesting posts.

Ah - so you dont want a log of your score*file* but
a log of the effect that the scorefile has on your groups!

Anyway, all posts with a negative score other than -9999
simply get marked as "deleted" and not killed right away.
So, adjusting your scores still allows you to see which
articles got selected - all it takes then is an 'x'punge.

Sven

Re: Score file log for slrn ? -> man diff
#54442
Author: jamie
Date: Mon, 22 Nov 1999 00:00
155 lines
5224 bytes
Sven Guckes <guckes@math.fu-berlin.de> wrote:
>* Mike Mckinney <mike@mike.local.net>:
>> Sometime back, for a previous version of slrn, someone
>> wrote a patch to have slrn generate a Score file log.
>> Does anyone know if such a patch is
>> available for current versions of slrn ?
>
>Well, what would that patch do other than using "diff"?

The original patch's diffs are too different from the current version
files to successfully patch them.  At Mike's request, I just rebuilt
Ollie's  "kill log" patch for slrn 0.9.5.7, using the original patch
as a guide.

The setting for this in the .slrnrc file would be
  set kill_log "News/killlog"
or whatever you set your news dir and kill log file to be.

------Cut here for slrnkilllog957.patch--------------
--- art.c.orig	Mon Nov 22 10:34:43 1999
+++ art.c	Mon Nov 22 11:24:14 1999
@@ -158,6 +158,10 @@
 
 Slrn_Article_Line_Type *Slrn_Article_Lines;
 
+#if SLRN_HAS_KILL_LOG
+char *Slrn_Kill_Log = NULL;
+#endif
+
 /*}}}*/
 /*{{{ static global variables */
 static SLscroll_Window_Type Slrn_Article_Window;
@@ -227,6 +231,9 @@
  * points at the current article, the we are at the end of that article.
  * If it points anywhere else, ignore it.
  */
+#if SLRN_HAS_KILL_LOG
+static FILE *fp_killlog = NULL;
+#endif
 
 /*}}}*/
 /*{{{ static function declarations */
@@ -5440,8 +5447,15 @@
      }
    else if (score < Slrn_Low_Score_Max)
      {
-	if ((score <= Slrn_Kill_Score_Max) && apply_kill)
-	  {
+       int kill_art = ((score <= Slrn_Kill_Score_Max) && apply_kill);
+#if SLRN_HAS_KILL_LOG
+       if (fp_killlog != NULL)
+        fprintf( fp_killlog, "[%s]\nScore: %d%s\nFrom: %s\nSubject: %s\n"
+                 "Message-ID: %s\n\n", Slrn_Current_Group_Name, score,
+                 kill_art?" (killed)":"", h->from, h->subject, h->msgid );
+#endif
+       if (kill_art)
+	     {
 	     int number = h->number;
 	     free_header (h);
 	     add_to_kill_list (number);
@@ -7437,7 +7451,16 @@
 #endif
    
    if (score && (1 == slrn_open_score (Slrn_Current_Group_Name)))
-     Perform_Scoring = 1;
+     {
+#if SLRN_HAS_KILL_LOG
+       if ((Slrn_Kill_Log != NULL) && (fp_killlog == NULL))
+         {
+            char file[SLRN_MAX_PATH_LEN];
+            fp_killlog = slrn_open_home_file( Slrn_Kill_Log, "a", file, 1 );
+         }
+#endif
+       Perform_Scoring = 1;
+     }
    else Perform_Scoring = 0;
    
    Slrn_Server_Min = r->min;
@@ -7578,7 +7601,23 @@
    else if (Slrn_Score_After_XOver 
        && Perform_Scoring)
      score_headers ();
-   
+
+#if SLRN_HAS_KILL_LOG
+   if (fp_killlog)
+     {
+       fprintf( fp_killlog, "[%s] killed %u, high %u, low %u\n\n",
+               Slrn_Current_Group_Name, Number_Killed,
+               Number_High_Scored, Number_Low_Scored );
+
+# if 0 /* could close file, but just flushing saves time entering a group */
+       fclose( fp_killlog );
+       fp_killlog = NULL;
+# else
+       fflush( fp_killlog ); /* flush buffer to disk */
+# endif
+     }
+#endif
+
    if (Headers == NULL)
      {
 	slrn_close_score ();
--- art.h.orig	Mon Nov 22 10:42:04 1999
+++ art.h	Mon Nov 22 10:43:12 1999
@@ -62,6 +62,9 @@
 extern int Slrn_Sig_Is_End_Of_Article;
 extern int Slrn_Del_Article_Upon_Read;
 extern int Slrn_Followup_Strip_Sig;
+#if SLRN_HAS_KILL_LOG
+extern char *Slrn_Kill_Log;
+#endif
 
 #endif				       /* NOT SLRNPULL_CODE */
 
--- startup.c.orig	Mon Nov 22 10:44:11 1999
+++ startup.c	Mon Nov 22 10:50:43 1999
@@ -565,6 +565,14 @@
 	  NULL
 #endif
      },
+     {"kill_log",
+#if SLRN_HAS_KILL_LOG
+        &Slrn_Kill_Log
+#else
+       NULL
+#endif
+    },
+	     
      {"server_object", &Server_Object},
      {"post_object", &Post_Object},
      {"printer_name", &Slrn_Printer_Name},
--- slrnfeat.h.orig	Mon Nov 22 10:51:31 1999
+++ slrnfeat.h	Mon Nov 22 10:52:50 1999
@@ -61,6 +61,11 @@
  */
 #define SLRN_HAS_CHARACTER_MAP	1
 
+/* If you want to be able to generate a log of posts killed by the scorefile
+ * (i.e. given a score of -9999) set this to 1.
+ */
+#define SLRN_HAS_KILL_LOG      1
+
 /* If you want to use uudeview's uulib instead of slrn's builtin one
  * change this to 1.  You will also need to edit the Makefile to point to
  * the uudeview include file and and library.  Only enable this if you

-----end of slrnkilllog957.patch------

-- 
  jamie  (mjwm@austin.rr.com)

  		"There's a seeker born every minute."

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