🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Andreas Barth Sun, 10 Oct 1999 00:00
[slrn] Order newsgroups by expression?
#52990
Author: Andreas Barth
Date: Sun, 10 Oct 1999 00:00
24 lines
1066 bytes
Hi,

is there a possibility to order the newsgroups in slrn according
to a regular expressions?

This means if the expression says:
| *announce
| news.*
| *
that first all announce-newsgroups should be shown, than those in
news.* and than the rest of the groups. Order in these subgroups
should be either like .jnewsrc, or alphabetical or reverse
alphabetical.

Any hints?



Andi
-- 
sig lost

Re: [slrn] Order newsgroups by expression?
#53133
Author: Dawn Owens-Nicholson
Date: Wed, 13 Oct 1999 00:00
78 lines
3383 bytes
Andreas Barth wrote:
> is there a possibility to order the newsgroups in slrn according
> to a regular expressions?

Sure.  Use the following macros for moving a group around (see the slrn
S-Lang API documentation on group_up_n()/group_down_n() for a description on
how these functions work--these functions move the cursor and the group at
the cursor, not just the cursor).  Put these macros in a file (say,
"group_move.sl") so you can reuse them later in your own macros and keep
them in their own namespace.

implements ("Group_Move");
static define move_group_up_n (n)
{
   variable
     group = current_newsgroup (),
     moved = 0;

   loop (n)
     {
        call ("transpose_groups");
        if (current_newsgroup () == group) break;
        while (current_newsgroup () != group) () = group_search (group);
        moved++;
     }  
   return (moved);
}

static define move_group_down_n (n)
{
   variable
     group = current_newsgroup (),
     moved = 0;

   loop (n)
     {
        !if (group_down_n (1)) break;
        call ("transpose_groups");
        moved++;
        if (current_newsgroup () == group) break;
        () = group_up_n (1);
     }
   return (moved);
}

I've got a mostly completed group sorting macro going, but it doesn't do the
specific custom sort you're talking about below.  It sorts the following
ways:

  * ASCII order                        * total GroupLens count for group
  * truly unread article count         * apparently unread article count
  * total score of articles            * number of high-scoring articles
  * reverse current sort order         * user-defined sorting
  * total Velveeta score of articles (rules I used for Velveeta scoring are in
    <crosspost-stopper#19981227043014@khms.westfalen.de>)

> This means if the expression says:
> | *announce
> | news.*
> | *
> that first all announce-newsgroups should be shown, than those in
> news.* and than the rest of the groups. Order in these subgroups
> should be either like .jnewsrc, or alphabetical or reverse
> alphabetical.

By the way, the first regex ("*announce") isn't portable--it will do
different things depending on how a leading asterisk is interpreted.  I
mention this because these examples suggest you're actually interested in
/wildmats/, not what are commonly called regular expressions.  If you really
want wildmats, I'd say use regular expressions instead.  Regexes are more
powerful and you get them for free.  Wildmats are pretty much a waste of
time.

Assuming you really meant regular expressions, it's not clear how you want
to sort groups--if a group matches two or more regexes, where would the
group end up?

Re: [slrn] Order newsgroups by expression?
#53185
Author: Dawn Owens-Nicholson
Date: Fri, 15 Oct 1999 00:00
22 lines
1668 bytes
Markus Becker wrote:
> You say this with such authority, that I suppose you earn your money
> using/programming slrn. ;-)

Nope, heh.  I asked a while ago about moving groups around and ended up with
macros that reinvent how move_group moves groups.  I knew about move_group,
but that didn't apply to my problem because they're only accessible from
someone sitting at the keyboard and I wanted more feedback about the extent
to which the move succeeded.

> I've read about GroupLens in the docs, but it still doesn't make sense
> to me. Is there any place I can get information about this?

http://www.cs.umn.edu/Research/GroupLens/ is the home page.  It's a
rating/prediction system for Usenet articles.

> I feel like I'm totally off. What's a "Velveeta score"?

See http://www.deja.com/msgid.xp?MID=%3Ccrosspost-stopper%2319981227043014@khms.westfalen.de%3E&fmt=text
for more info.

Re: [slrn] Order newsgroups by expression?
#53196
Author: Markus Becker
Date: Fri, 15 Oct 1999 00:00
19 lines
1331 bytes
On 13 Oct 1999 05:32:46 GMT, Dawn Owens-Nicholson wrote:
>Sure.  Use the following macros for moving a group around (see the slrn

You say this with such authority, that I suppose you earn
your money using/programming slrn. ;-)

>  * ASCII order                        * total GroupLens count for group

I've read about GroupLens in the docs, but it still doesn't make sense
to me. Is there any place I can get information about this?

>  * total Velveeta score of articles (rules I used for Velveeta scoring are in

I feel like I'm totally off. What's a "Velveeta score"?

Markus


Re: [slrn] Order newsgroups by expression?
#53374
Author: Markus Becker
Date: Sat, 23 Oct 1999 00:00
17 lines
1291 bytes
On 15 Oct 1999 00:51:11 GMT, Dawn Owens-Nicholson wrote:
>http://www.cs.umn.edu/Research/GroupLens/ is the home page.  It's a
>rating/prediction system for Usenet articles.

Thanks.

>> I feel like I'm totally off. What's a "Velveeta score"?
>
>See http://www.deja.com/msgid.xp?MID=%3Ccrosspost-stopper%2319981227043014@khms.westfalen.de%3E&fmt=text
>for more info.

Ok, I think I got the idea. But why publish all those articles?

Markus


Re: [slrn] Order newsgroups by expression?
#53396
Author: Dawn Owens-Nicholson
Date: Sat, 23 Oct 1999 00:00
8 lines
1175 bytes
Markus Becker wrote:
> Ok, I think I got the idea. But why publish all those articles?

I don't understand your question.  To let everyone know, I don't control
anything to do with Velveeta scores including the algorithm for determining
an article's Velveeta score or how often the algorithm is posted.

Re: [slrn] Order newsgroups by expression?
#53451
Author: Markus Becker
Date: Mon, 25 Oct 1999 00:00
24 lines
1770 bytes
On 23 Oct 1999 21:29:26 GMT, Dawn Owens-Nicholson wrote:
>> Ok, I think I got the idea. But why publish all those articles?
>I don't understand your question.
Ok, I'll try to explain.
It's ok to post the algorithm and the scoring scheme (sp?) or whatever.
As often as you like it.
But I think it is not necessary to post a list of _usenet_ articles
(that's what I meant) along with their scores.

>To let everyone know, I don't control
>anything to do with Velveeta scores including the algorithm for determining
>an article's Velveeta score or how often the algorithm is posted.

I didn't assume that. But you're competent on "velveeta scores" and so I
asked you who happened to be there. Ok?

BTW here in Germany "Velveeta" is a kind of cheese, and I think in the
US, too.
Is there any connection?

Markus


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