🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Benjamin Esham Sat, 10 Aug 2019 17:25
[slrn] Applying scores before entering groups
#263661
Author: Benjamin Esham
Date: Sat, 10 Aug 2019 17:25
22 lines
1764 bytes
Hi all,

There are a few groups where I've killfiled some of the most active posters.
I also use the turbo-plonk script to ignore all follow-ups to people I've
ignored. As a result, when I fetch new articles in slrn, it will show that
these groups have new messages but when I enter the group (and slrn applies
my scores) it will often turn out that all of the new articles are scored
below my "max_low_score" and so there are, as far as I'm concerned, no new
articles in that group.

Is there a way to get slrn to apply my scores as soon as it retrieves the
new articles from the server? (It seems that slrn doesn't download full
headers until you actually enter a group, so maybe this wouldn't be easy to
implement...)

Thanks,

Benjamin

-- 
Benjamin Esham
https://esham.io
Re: [slrn] Applying scores before entering groups
#263662
Author: 😉 Good Guy 😉
Date: Sat, 10 Aug 2019 17:35
72 lines
3289 bytes
This is a multi-part message in MIME format.
--------------080806010608060704020109
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 10/08/2019 18:25, Benjamin Esham wrote:
>
> Is there a way to get slrn to apply my scores as soon as it retrieves the
> new articles from the server?

The easiest way is not to visit any newsgroups.  Try using forums for 
your pass-time activities.  Newsgroups are for trolls.

What exactly do you do on newsgroups?  It can't be anything other than 
trolling.



>


-- 
With over 999 million devices now running Windows 10, customer 
satisfaction is higher than any previous version of windows.

--------------080806010608060704020109
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFE0" text="#006600">
    <div class="moz-cite-prefix">On 10/08/2019 18:25, Benjamin Esham
      wrote:<br>
    </div>
    <blockquote cite="mid:jz5shmva.tw3x3k@bdesham.net" type="cite">
      <pre wrap="">

Is there a way to get slrn to apply my scores as soon as it retrieves the
new articles from the server? </pre>
    </blockquote>
    <br>
    The easiest way is not to visit any newsgroups.  Try using forums
    for your pass-time activities.  Newsgroups are for trolls.<br>
    <br>
    What exactly do you do on newsgroups?  It can't be anything other
    than trolling.<br>
    <br>
    <br>
    <br>
    <blockquote cite="mid:jz5shmva.tw3x3k@bdesham.net" type="cite">
      <pre wrap="">

</pre>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
      <div class="moz-signature">
        <div style="width: 340px;height: 290px; background-color: blue;
          color: yellow;font-weight: bolder; font-size:200%; text-align:
          center; margin: 30px 5px 30px 5px;">With over 999 million
          devices now running Windows 10, customer satisfaction is
          higher than any previous version of windows.</div>
      </div>
    </div>
  </body>
</html>

--------------080806010608060704020109--
Re: [slrn] Applying scores before entering groups
#263663
Author: J.B. Nicholson
Date: Sun, 11 Aug 2019 21:51
138 lines
5806 bytes
Benjamin Esham <usenet@esham.io> wrote:
> Is there a way to get slrn to apply my scores as soon as it
> retrieves the new articles from the server?

Yes, but once you see how much time this takes to do you probably
won't want to do this and you'll probably decide that it's okay that
slrn occasionally tells you that your scorefile killed all unread
articles.

A macro (such as the one below) will do what you want by visiting each
newsgroup on startup or on fetching new news, marking all articles
unread, and then quitting back to group mode.

This will make slrn process your scores and leave you with an unread
article count that takes into account the articles you've killed thus
giving you a more accurate group unread count.

To install this, copy the following (between the verbatim marks) into
a file (say "show_unkilled_group_counts.sl" in your home directory),
and load the file by appending:

  interpret "~/show_unkilled_group_counts.sl"

to your slrnrc file.

This should run automatically when you launch slrn and when you fetch
new news from group mode by pressing "G" (the default keybinding).

Be warned: this only runs quickly enough to avoid annoyance when you
have a very fast connection to your news server.

How fast? If you are running a local news cache or running slrn on the
same machine as your news server you'll probably not notice this
macro. The speed problem is inherent in the concept -- there's nothing
about fetching all the info needed to properly process a scorefile
that scales up well; the more groups you have listed in group mode,
the more data this macro makes a newsreader (not just slrn) fetch, so
the longer it takes to let you see the most accurate unread article
count.

Enjoy.



#v+
% Show Unkilled Group Counts by J.B. Nicholson (jbn@forestfield.org)

implements ("Show_Unkilled_Group_Counts");

% Make slrn show group mode article counts that take killed articles
% into account.

static define group_mode_startup_hook ()
{
   % Enter every group in group mode, mark remaining (unkilled)
   % articles unread and reset their score (in case another macro
   % saves their score on leaving group mode).
   variable
     starting_newsgroup = current_newsgroup (),
     starting_sorting_method = 0,
     starting_query_read_group_cutoff = get_variable_value ("query_read_group_cutoff"),
     starting_prefix_argument = get_prefix_arg();

   if (starting_newsgroup == "") return;
   reset_prefix_arg();
   set_integer_variable ("query_read_group_cutoff", 0);

   EXIT_BLOCK
     {
	% Leave the cursor where we started.
	while (current_newsgroup != starting_newsgroup)
	  {
	     ifnot (group_search (starting_newsgroup)) break;
	  }
	
	% Restore saved state.
	set_integer_variable ("query_read_group_cutoff", starting_query_read_group_cutoff);
	set_prefix_argument (starting_prefix_argument);
     }

   call ("bob");
   do
     {
	ifnot (group_unread()) continue;
	try
	  {
	     () = select_group();
	  }
	% It's not clear how to distinguish between the user
	% interrupting the transfer of article headers (where we want
	% to cancel running this macro) or some other error such as
	% all articles got killed by the scorefile (where we want to
	% continue running this macro).
	catch UserBreakError:
	  {
	     % Hopefully this catches the error when the user
	     % cancels running this macro.
	     _clear_error();
	     ifnot (is_group_mode()) call ("quit");
	     return;
	  }
	catch AnyError:
	  {
	     % We'll keep going.
	     _clear_error();
	     ifnot (is_group_mode()) call ("quit");
	     continue;
	  }
	if (is_group_mode()) continue;

	if (get_variable_value ("confirm_actions") & 1) set_input_chars ("y");
	call ("uncatchup_all");

	call ("quit");
	ifnot (is_group_mode())
	  throw (RunTimeError, "It's not clear why you're not in group mode now.");
     }
   while (group_down_n (1));
}
switch (register_hook ("group_mode_startup_hook", "Show_Unkilled_Group_Counts->group_mode_startup_hook"))
{ case 0: throw (InternalError, "slrn is not seeing the hook properly."); }
{ case 1: % This is real. System report: Everything is fine. Nothing is ruined. -HR
}
{ case 2: throw (InternalError, "slrn sees the hook as already registered."); }
{ case 3: throw (InternalError, "slrn is not seeing the function properly."); }

static define refresh_groups ()
{
   % Update unread counts when we get new news (and possibly new
   % newsgroups).
   ifnot (is_group_mode())
     throw (UsageError, "Show_Unkilled_Group_Counts->refresh_groups is not meant for use in article mode!");
   
   call ("refresh_groups");
   Show_Unkilled_Group_Counts->group_mode_startup_hook();
}
definekey ("Show_Unkilled_Group_Counts->refresh_groups", "G", "group");
#v-
Re: [slrn] Applying scores before entering groups
#263673
Author: Benjamin Esham
Date: Mon, 19 Aug 2019 00:59
43 lines
2859 bytes
J.B. Nicholson wrote:

> Benjamin Esham <usenet@esham.io> wrote:
>
>> Is there a way to get slrn to apply my scores as soon as it
>> retrieves the new articles from the server?
>
> Yes, but once you see how much time this takes to do you probably
> won't want to do this and you'll probably decide that it's okay that
> slrn occasionally tells you that your scorefile killed all unread
> articles.
>
> A macro (such as the one below) will do what you want by visiting each
> newsgroup on startup or on fetching new news, marking all articles
> unread, and then quitting back to group mode.
>
> This will make slrn process your scores and leave you with an unread
> article count that takes into account the articles you've killed thus
> giving you a more accurate group unread count.

Thank you so much for putting this together, J.B.! I don't mind the
slowness--my connection is reasonably fast and I don't subscribe to that
many groups.

I think there might have been a couple of times where this didn't work
exactly right. If that's true, it's probably because my scorefile doesn't
actually kill anything: as I mentioned in a different thread, I'm using
turbo-plonk to hide the replies to posts I don't want to see. In order for
turbo-plonk to be able to do this, the scorefile can't actually kill
articles, because otherwise turbo-plonk would never see them. The only way I
can get slrn to score and hide articles in the way I want is with an
ever-larger pile of runtime macros, so I'm not surprised that they've
started to interfere with each other :-) Usenet is quiet enough these days
that I can't really bring myself to learn S-Lang and dive into slrn; I think
I'll just make do with what I have.

Thanks again,

Benjamin

-- 
Benjamin Esham
https://esham.io
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