🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Daniel E. Macks Thu, 20 Feb 2003 01:24
slrn: Redefining detection of my posts
#120427
Author: Daniel E. Macks
Date: Thu, 20 Feb 2003 01:24
16 lines
1459 bytes
I'm using slrn-0.9.7.4. When browsing a group, my own posts are
indicated by boldface of the author field. This seems to (at least in
large part) be based on the realname variable. Is there a way to
change the detection of "my" posts to use a regex or somesuch? Reason:
I use several different accounts that have different names, and I'd
like to see all of mine (the person, not the account). Would also be
useful for folks that use group/date-stamped or other changing munges.

dan

-- 
Daniel Macks
dmacks@sas.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
Re: slrn: Redefining detection of my posts
#120433
Author: SINNER
Date: Thu, 20 Feb 2003 02:29
21 lines
2158 bytes
While strolling through news.software.readers, Daniel E. Macks was overheard plotting:
> I'm using slrn-0.9.7.4. When browsing a group, my own posts are
> indicated by boldface of the author field. This seems to (at least in
> large part) be based on the realname variable. Is there a way to
> change the detection of "my" posts to use a regex or somesuch? Reason:
> I use several different accounts that have different names, and I'd
> like to see all of mine (the person, not the account). Would also be
> useful for folks that use group/date-stamped or other changing munges.
> 
> dan
> 

I believe there is a Macro that helps facilitate this. identity.sl
available from the slrn website.

-- 
David
The universe is ruled by letting things take their course.  It cannot be
ruled by interfering.
		-- Chinese proverb
Re: slrn: Redefining detection of my posts
#120441
Author: Daniel E. Macks
Date: Thu, 20 Feb 2003 05:36
26 lines
2159 bytes
SINNER <99nesorjd@gates_of_hell.INVALID> said:
> While strolling through news.software.readers, Daniel E. Macks was overheard plotting:
>> I'm using slrn-0.9.7.4. When browsing a group, my own posts are
>> indicated by boldface of the author field. This seems to (at least in
>> large part) be based on the realname variable. Is there a way to
>> change the detection of "my" posts to use a regex or somesuch?
> 
> I believe there is a Macro that helps facilitate this. identity.sl
> available from the slrn website.

That gives a single identity (set realname, etc.) on a per-group
(groupname regex) basis. As I understand the code (don't know for
sure...doesn't seem to work...followed the instructions but ESC I only
gave my default identity), when entering a group, it picks the first
identity that matches the groupname. To use this model, I would need:
multiple identities per group (when entering it) and somehow define
which (single) one is active when starting a new post.

dan

-- 
Daniel Macks
dmacks@sas.upenn.edu
dmacks@netspace.org
http://www.netspace.org/~dmacks
Re: slrn: Redefining detection of my posts
#120471
Author: J.B. Nicholson-Owens
Date: Thu, 20 Feb 2003 23:48
81 lines
4541 bytes
Daniel E. Macks wrote:
> I'm using slrn-0.9.7.4. When browsing a group, my own posts are
> indicated by boldface of the author field. This seems to (at least in
> large part) be based on the realname variable.  Is there a way to
> change the detection of "my" posts to use a regex or somesuch?

Changing realname to work as a regular expression is an option.  Such a
change requires changing the slrn program.  Since slrn is Free Software you
could do the change yourself or get someone to do it for you.  In order to
make the change compatible with how slrn's realname currently works, you'll
probably want some way of telling slrn whether realname should be
interpreted as a regular expression or not (the default being to interpret
realname as a string).

Alternatively, you could use scoring to set the score of your posts to be a
value which will be displayed prominently in the article list.

> I use several different accounts that have different names, and I'd
> like to see all of mine (the person, not the account). Would also be
> useful for folks that use group/date-stamped or other changing munges.

This suggests another approach--if you use the same name for a certain
amount of time, only change names based on the newsgroup, you can change
$NAME and then slrn will find that.  This would effectively be the same
thing as changing slrn's "realname" setting with a group_mode_hook():

#v+
    implements ("my");
    static variable starting_realname = get_variable_value ("realname");
    static define group_mode_hook ()
    {
       % Change slrn's realname setting depending on what group is entered.
       % Unnamed groups use the name listed in the slrnrc, $NAME, or on
       % Unix-like systems, one's passwd entry (in that order).  See slrn's
       % manual for complete details.

       variable
         realname = starting_realname,
         current_newsgroup_name = current_newsgroup ();

       if (string_match (current_newsgroup_name, "^alt\\.", 1))
         {
            realname = "alt group name";
         }
       else if (string_match (current_newsgroup_name, "^comp\\.", 1))
         {
            realname = "comp group name";
         }
       else if (string_match (current_newsgroup_name, "font", 1))
         {
            realname = "font groups name";
         }

       set_string_variable ("realname", realname);
    }
    !if (register_hook ("my->group_mode_hook", "group_mode_hook"))
       message ("Could not register my->group_mode_hook() with group_mode_hook().");
#v-

You can copy the above function, put it in a file (say "my_hooks.sl" in your
homedir) and then load it into slrn by adding the following to your slrnrc:

#v+
  interpret "my_hooks.sl"
#v-

and then restart slrn.  Now switching into a group that matches "^alt\."
will set your realname to "alt group name", switching to a group that
matches "^comp\." will make your realname "comp group name", and switching
to a group with "font" somewhere in the name will make your realname "font
groups name".

To illustrate with an example: entering alt.fonts will make your realname
"alt group name" because the check for ^alt\. matches and trumps all
subsequent checks.  I think the logic of this sequence is easy enough to
understand so that you can customize it to your needs.

Identity.sl does something similar to this but with far more settings,
allows for groups of settings, and a more easily used user interface.  In
exchange for the easy user interface you lose some flexibility.
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