Discussion:
[slrn] evaluating Score and checking articles for many groups
(too old to reply)
Rob
2020-04-19 13:38:22 UTC
Permalink
When starting slrn a list of subscribed newsgroups with new articles
appears. This includes the number of articles, which is only a guess.

When a group is visited, the actual headers are retrieved and the
Score file is evaluated, often resulting in a lower number of articles,
even zero. Then the group is not entered and we remain in the group list.

Is there some way to kick this evaluation for all subscribed groups
in one go? (reducing the groups list so it only shows groups that
actually have articles in them that are not killed or canceled)

If not, I would like to add a function that walks the list of subscribed
groups, and for each group that has only 1 or 2 new articles in it,
will temporarily "visit" the group to invoke this evaluation and go
back to the group list.

How would I proceed to write this? Is there some place where I can
find example s-lang code that would perform such actions?
(walk list of subscribed group, get info like "number of unread articles",
conditionally open the group to fetch and evaluate headers and go back
to the list walk)

I would find this useful in cases where one article is posted amongst
many groups (like today), where setting a Score does not really help
when you have many subscribed groups where articles rarely appear...
Mike Yetto
2020-04-19 16:12:04 UTC
Permalink
So it is writ, so mote it be....
Post by Rob
When starting slrn a list of subscribed newsgroups with new articles
appears. This includes the number of articles, which is only a guess.
When a group is visited, the actual headers are retrieved and the
Score file is evaluated, often resulting in a lower number of articles,
even zero. Then the group is not entered and we remain in the group list.
The number of articles that are filtered out is determined by
downloading the header and parsing it with the score file. The
number first presented is calculated using the highest article
number the server has and the run-list from the newsrc file.
Post by Rob
Is there some way to kick this evaluation for all subscribed groups
in one go? (reducing the groups list so it only shows groups that
actually have articles in them that are not killed or canceled)
That would require a download of all unread articles in all
groups from all servers when entering slrn. This would take a
non-negligible amount of time.
Post by Rob
If not, I would like to add a function that walks the list of subscribed
groups, and for each group that has only 1 or 2 new articles in it,
will temporarily "visit" the group to invoke this evaluation and go
back to the group list.
It will be necessary to check each group to determine if the group
should be checked.
Post by Rob
How would I proceed to write this? Is there some place where I can
find example s-lang code that would perform such actions?
(walk list of subscribed group, get info like "number of unread articles",
conditionally open the group to fetch and evaluate headers and go back
to the list walk)
If you just open and immediately close each group you would end
up with an updated and more accurate number at the expense of
waiting for each group to open.
Post by Rob
I would find this useful in cases where one article is posted amongst
many groups (like today), where setting a Score does not really help
when you have many subscribed groups where articles rarely appear...
You would find this an unnecessary, time consuming, or even
annoying addition to presenting the group list.

Mike 'just open each as you get to it' Yetto
--
"I need sceptical, clever, critical. Sceptical and critical, remember?
Be strong, even if it breaks your heart."
- The Twelfth Doctor, Dr. Who, Dark Water, with Peter Capaldi
Frank Slootweg
2020-04-19 18:10:12 UTC
Permalink
Post by Mike Yetto
So it is writ, so mote it be....
[...]
Post by Mike Yetto
Post by Rob
Is there some way to kick this evaluation for all subscribed groups
in one go? (reducing the groups list so it only shows groups that
actually have articles in them that are not killed or canceled)
That would require a download of all unread articles in all
groups from all servers when entering slrn. This would take a
non-negligible amount of time.
Yes, that would take a considerable amount of time, but that
downloading/processing does not neccessarily have to be done at normal
startup.

For example I used to do a similar - but not the same - thing in tin,
by running tin (with -Zv) in cron/at scheduled batch mode, *before*
normal interactive use. So yes, there was time-consuming downloading/
processing, but no, it did not affect my normal interactive use.

So if slrn can also be run in batch/non-interactive mode, this
approach may be worth considering.

[...]
Benjamin Esham
2020-04-19 18:40:45 UTC
Permalink
Post by Frank Slootweg
Post by Mike Yetto
Post by Rob
Is there some way to kick this evaluation for all subscribed groups
in one go?
That would require a download of all unread articles in all
groups from all servers when entering slrn. This would take a
non-negligible amount of time.
Yes, that would take a considerable amount of time, but that
downloading/processing does not neccessarily have to be done at normal
startup.
For example I used to do a similar - but not the same - thing in tin,
by running tin (with -Zv) in cron/at scheduled batch mode, *before*
normal interactive use. So yes, there was time-consuming downloading/
processing, but no, it did not affect my normal interactive use.
So if slrn can also be run in batch/non-interactive mode, this
approach may be worth considering.
IIRC slrn doesn't have a batch mode, but another possibility might be to run
a local NNTP proxy (e.g. Leafnode), so that even if slrn has to do a lot of
communication with "the server" it will take a negligible amount of time.

Benjamin
Rob
2020-04-19 18:44:02 UTC
Permalink
Post by Benjamin Esham
IIRC slrn doesn't have a batch mode, but another possibility might be to run
a local NNTP proxy (e.g. Leafnode), so that even if slrn has to do a lot of
communication with "the server" it will take a negligible amount of time.
I am already running slrn with server and client on the same local network,
so it is very fast.
(I run slrn via ssh on a shell server my ISP provides)
Ian Zimmerman
2020-04-20 19:17:42 UTC
Permalink
Post by Benjamin Esham
IIRC slrn doesn't have a batch mode, but another possibility might be
to run a local NNTP proxy (e.g. Leafnode), so that even if slrn has to
do a lot of communication with "the server" it will take a negligible
amount of time.
Isn't this exactly what slrnpull is for?
--
Ian
Benjamin Esham
2020-04-23 03:42:30 UTC
Permalink
Post by Ian Zimmerman
Post by Benjamin Esham
IIRC slrn doesn't have a batch mode, but another possibility might be
to run a local NNTP proxy (e.g. Leafnode), so that even if slrn has to
do a lot of communication with "the server" it will take a negligible
amount of time.
Isn't this exactly what slrnpull is for?
Ah, you're right. I had completely forgotten about slrnpull!

Benjamin
Rob
2020-04-19 18:28:30 UTC
Permalink
Post by Mike Yetto
So it is writ, so mote it be....
Post by Rob
When starting slrn a list of subscribed newsgroups with new articles
appears. This includes the number of articles, which is only a guess.
When a group is visited, the actual headers are retrieved and the
Score file is evaluated, often resulting in a lower number of articles,
even zero. Then the group is not entered and we remain in the group list.
The number of articles that are filtered out is determined by
downloading the header and parsing it with the score file. The
number first presented is calculated using the highest article
number the server has and the run-list from the newsrc file.
That is what I understand, and why I said "it is only a guess".
Post by Mike Yetto
Post by Rob
Is there some way to kick this evaluation for all subscribed groups
in one go? (reducing the groups list so it only shows groups that
actually have articles in them that are not killed or canceled)
That would require a download of all unread articles in all
groups from all servers when entering slrn. This would take a
non-negligible amount of time.
Assuming I am only using score on header items and want to remove
articles that are canceled, it only needs to download headers, right?
Furthermore, the groups that I want to do this for have only 1 or 2
unread articles, and downloading them should not take long.
At least it doesn't when I perform this task manually...
(ENTER, down arrow, ENTER, down arrow etc)

I don't mind it takes time, I want to reduce effort.
And I do not want it to do this *every time*, but only when I start
slrn and find I have many pages of groupnames all with 1 article, I
want to run some function manually to do this once.
Post by Mike Yetto
Post by Rob
If not, I would like to add a function that walks the list of subscribed
groups, and for each group that has only 1 or 2 new articles in it,
will temporarily "visit" the group to invoke this evaluation and go
back to the group list.
It will be necessary to check each group to determine if the group
should be checked.
Why?
When I open slrn I see all those groups listed as having 1 article, so
would it not be possible to write a function that takes this same list
and visits all the groups with only 1 article?
Post by Mike Yetto
Post by Rob
How would I proceed to write this? Is there some place where I can
find example s-lang code that would perform such actions?
(walk list of subscribed group, get info like "number of unread articles",
conditionally open the group to fetch and evaluate headers and go back
to the list walk)
If you just open and immediately close each group you would end
up with an updated and more accurate number at the expense of
waiting for each group to open.
Yes, that is what I want to do for all groups which have 1 or 2 unread
articles at the time I see this condition exists.
(having a list with 200 groups with 1 article each, and some groups
with more articles, it does not need to visit those)
Post by Mike Yetto
Post by Rob
I would find this useful in cases where one article is posted amongst
many groups (like today), where setting a Score does not really help
when you have many subscribed groups where articles rarely appear...
You would find this an unnecessary, time consuming, or even
annoying addition to presenting the group list.
I don't want it to be an addition to presenting the group list!
I want it as a function after having seen that the group list is huge,
which happens once a month for our local groups where some admin posts
the charter every month, which of course I have killfiled, but I still
need to go along all those groups to process that.
Post by Mike Yetto
Mike 'just open each as you get to it' Yetto
Unfortunately it requires me to press ENTER, DOWN ARROW, repeatedly
for 200 times or more and when I mistakenly hit one of them twice before
hitting the other, unwanted things happen.
Benjamin Esham
2020-04-19 18:26:12 UTC
Permalink
Post by Rob
When a group is visited, the actual headers are retrieved and the
Score file is evaluated, often resulting in a lower number of articles,
even zero. Then the group is not entered and we remain in the group list.
Is there some way to kick this evaluation for all subscribed groups
in one go?
I asked the same question a few months ago. See the thread with the subject
"[slrn] Applying scores before entering groups". In particular, my original
post was [1] and J.B. Nicholson posted a working macro and some commentary
in [2]. This approach has some big caveats, as other posters have already
pointed out in this thread, but I'll leave it to you to decide whether the
trade-off is worth it :-)

Hope this helps,

Benjamin


[1] Message-ID <***@bdesham.net>
http://al.howardknight.net/?ID=158732052800

[2] Message-ID <***@forestfield.org>
http://al.howardknight.net/?ID=158732049100
Rob
2020-04-19 18:42:37 UTC
Permalink
Post by Benjamin Esham
Post by Rob
When a group is visited, the actual headers are retrieved and the
Score file is evaluated, often resulting in a lower number of articles,
even zero. Then the group is not entered and we remain in the group list.
Is there some way to kick this evaluation for all subscribed groups
in one go?
I asked the same question a few months ago. See the thread with the subject
"[slrn] Applying scores before entering groups". In particular, my original
post was [1] and J.B. Nicholson posted a working macro and some commentary
in [2]. This approach has some big caveats, as other posters have already
pointed out in this thread, but I'll leave it to you to decide whether the
trade-off is worth it :-)
Thanks!
My news server does not have that much retention so I did not see this
discussion when I opened this group.
(I got the advise to consult this group after asking the question in a
local group)

As I explained in another followup, I do not want to run this function
every time I start slrn or get new articles, but only when I see after
startup that I have a long list of groups with one unread article, and
suspect that it has been canceled already or is covered by my Score file.

Also I do not want to run this on groups with many articles, because my
score file can either set articles to be completely invisible or to
be visible but already deleted. So when I would use that function all
the time I would lose that functionality. I presume I can use
if (group_unread() == 1) to enter only groups with 1 unread article.

So now I need to find how I can modify that code to run on a certain
key command instead of all the time.
George
2020-04-22 22:53:41 UTC
Permalink
Post by Rob
When starting slrn a list of subscribed newsgroups with new articles
appears. This includes the number of articles, which is only a guess.
Have you ever considered using slrnpull? You can set up a score file
to score any downloaded messages prior to running slrn in spool mode.
--
Democracy: Three wolves and a lamb vote for dinner.
Republic: Three wolves and a lamb vote for dinner,
but the lamb is armed & has the right
to an appeal in a court of law.
Socialism: Three Wolves have eaten the lamb
and are fighting amongst themselves
for scraps.
Rob
2020-04-23 08:32:53 UTC
Permalink
Post by George
Post by Rob
When starting slrn a list of subscribed newsgroups with new articles
appears. This includes the number of articles, which is only a guess.
Have you ever considered using slrnpull? You can set up a score file
to score any downloaded messages prior to running slrn in spool mode.
It would require storage for the articles. I run slrn on a shell server
provided by the ISP, connected to their news server on the same network.
Loading...