πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
20 messages
20 total messages Started by Michael Grimm Sat, 21 Feb 2009 19:28
[slrn] signature selection dependent on hierarchy, howto?
#230540
Author: Michael Grimm
Date: Sat, 21 Feb 2009 19:28
13 lines
1424 bytes
Hi -

Please ignore my ignorance, but I cannot find a way to select my
signature by means of hierarchy I'm posting to.

e.g. comp.ALL	--> siganture1
     news.ALL	--> signature2
     and so on

Regards,
Michael
-- 
to let
Re: [slrn] signature selection dependent on hierarchy, howto?
#230543
Author: wannes
Date: Sun, 22 Feb 2009 01:49
11 lines
1386 bytes
Michael Grimm schreef:
> Hi -
>
> Please ignore my ignorance, but I cannot find a way to select my
> signature by means of hierarchy I'm posting to.
>
> e.g. comp.ALL	--> siganture1
>      news.ALL	--> signature2
>      and so on

identity.sl can do that.
Re: [slrn] signature selection dependent on hierarchy, howto?
#230558
Author: Michael Grimm
Date: Sun, 22 Feb 2009 12:07
15 lines
1402 bytes
wannes <me@nospam.invalid> wrote:
> Michael Grimm schreef:

>> e.g. comp.ALL	--> siganture1
>>      news.ALL	--> signature2
>>      and so on
>
> identity.sl can do that.

I'll have a look on that.

Thanks,
Michael
-- 
to let
Re: [slrn] signature selection dependent on hierarchy, howto?
#230559
Author: houghi
Date: Sun, 22 Feb 2009 12:19
23 lines
1702 bytes
wannes wrote:
> Michael Grimm schreef:
>> Hi -
>>
>> Please ignore my ignorance, but I cannot find a way to select my
>> signature by means of hierarchy I'm posting to.
>>
>> e.g. comp.ALL	--> siganture1
>>      news.ALL	--> signature2
>>      and so on
>
> identity.sl can do that.

Do you have a URL?
http://slrn.sourceforge.net/docs/slrn-FAQ-2.html#ss2.8 points to
http://www.emmanuelebassi.net/slrn/ where it isn't available anymore.

houghi
-- 
This was written under the influence of the following:
|  Artist : Simon and Garfunkel
|    Song : Star Carol
|   Album : Old Friends
Re: [slrn] signature selection dependent on hierarchy, howto?
#230560
Author: wannes
Date: Sun, 22 Feb 2009 12:51
12 lines
1540 bytes
houghi schreef:
>>>
>>> Please ignore my ignorance, but I cannot find a way to select my
>>> signature by means of hierarchy I'm posting to.
>>>
>> identity.sl can do that.
>
> Do you have a URL?
> http://slrn.sourceforge.net/docs/slrn-FAQ-2.html#ss2.8 points to
> http://www.emmanuelebassi.net/slrn/ where it isn't available anymore.

No URL, but I have the script. Is the h @ h .org mail valid?
Re: [slrn] signature selection dependent on hierarchy, howto?
#230561
Author: wannes
Date: Sun, 22 Feb 2009 13:03
20 lines
1755 bytes
wannes schreef:
> houghi schreef:
>>>>
>>>> Please ignore my ignorance, but I cannot find a way to select my
>>>> signature by means of hierarchy I'm posting to.
>>>>
>>> identity.sl can do that.
>>
>> Do you have a URL?
>> http://slrn.sourceforge.net/docs/slrn-FAQ-2.html#ss2.8 points to
>> http://www.emmanuelebassi.net/slrn/ where it isn't available anymore.
>
> No URL, but I have the script. Is the h @ h .org mail valid?

Apparantly it still works with te latest slrn, just didn't set it up
properly.

-- 
wannes
<http://www.briachons.org/>
Re: [slrn] signature selection dependent on hierarchy, howto?
#230562
Author: wannes
Date: Sun, 22 Feb 2009 13:15
20 lines
1901 bytes
wannes schreef:
> houghi schreef:
>>>>
>>>> Please ignore my ignorance, but I cannot find a way to select my
>>>> signature by means of hierarchy I'm posting to.
>>>>
>>> identity.sl can do that.
>>
>> Do you have a URL?
>> http://slrn.sourceforge.net/docs/slrn-FAQ-2.html#ss2.8 points to
>> http://www.emmanuelebassi.net/slrn/ where it isn't available anymore.
>
> No URL, but I have the script. Is the h @ h .org mail valid?

Your google-skills are disappoint me houghi. ;-)
http://ftp.slackware.pl/pub/splack/splack-10.1/boot/initrd/var/adm/setup/tmp/slrn-pl-1.4.3-2/macros/identity.sl

-- 
wannes
<http://www.briachons.org/>
Re: [slrn] signature selection dependent on hierarchy, howto?
#230564
Author: houghi
Date: Sun, 22 Feb 2009 13:47
24 lines
2088 bytes
wannes wrote:
>> No URL, but I have the script. Is the h @ h .org mail valid?

Yes, it is.

> Your google-skills are disappoint me houghi. ;-)
> http://ftp.slackware.pl/pub/splack/splack-10.1/boot/initrd/var/adm/setup/tmp/slrn-pl-1.4.3-2/macros/identity.sl

Or http://tinyurl.com/bltr9r for thise who prefer their browser links
not to wrap or go beyond what they can see. ;-)

What did you use as searc?

Nice to see that folding is done when opening it with gvim. :-D

Now I just need to figure out how to use it. Looks like a lot of
overkill for just changing the sig per group. :-/

houghi
-- 
This was written under the influence of the following:
|  Artist : Simon and Garfunkel
|    Song : Keep The Customer Satisfied
|   Album : Old Friends
Re: [slrn] signature selection dependent on hierarchy, howto?
#230563
Author: houghi
Date: Sun, 22 Feb 2009 14:19
46 lines
3001 bytes
houghi wrote:
> Now I just need to figure out how to use it. Looks like a lot of
> overkill for just changing the sig per group. :-/

And it is. Here a list of hurdles I needed to take and why I did not
succeed.

1) Geting it started.
I read the file and there it says to put the following in slrnrc
`interpret "identity.sl"`. The fact that it talks about 'usual' scares
me, because to me there is nothing usual about it. I do not have one
thing like that. But OK, I put it in and it can't find the file.
I change the `interpret "identity.sl"` so that it can find it.

2) The next step.
I get an error now about home/houghi/slrn-pl.sl not being available.
WTF? OK, found it in http://preview.tinyurl.com/b8zlbn and had things
changed so it does not give the error anymore.

3) Configuration of the groups
It tals about writing `identity->add_new ("id", "newsgroup");` to some
file. I have ni idea what file they talk about, so I guestimate I need
to `interpret` this as well. I added the following line as the only line
to /home/houghi/News/identify:
identity->add_new ("be.test", "be.test");
and added the following lines to the beginning of my slrnrc:
% identify.sl stuff
interpret "/home/houghi/News/identity.sl"
interpret "/home/houghi/News/identity"

4) Configuration of the identity
It says "To modify each detail of your identity, you have wrappers to
the (private) modify() function:"
What are they talking about?

The least I can say is that the documantation expects you to know how
things work and as a result I have no idea what the next step should be.
:-(


houghi
-- 
This was written under the influence of the following:
|  Artist : Simon and Garfunkel
|    Song : The Boxer
|   Album : Old Friends
Re: [slrn] signature selection dependent on hierarchy, howto?
#230566
Author: John E. Davis
Date: Sun, 22 Feb 2009 15:24
35 lines
2299 bytes
On Sun, 22 Feb 2009 15:19:56 +0100, houghi <houghi@houghi.org.invalid>
wrote:
> And it is. Here a list of hurdles I needed to take and why I did not
> succeed.

Try a variation of the following.  In your .slrnrc file, put:

   interpret "/path/to/slrn-signature.sl"

In "/path/to/slrn-signature.sl", put:

   private define set_signature ()
   {
      variable group = current_newsgroup ();
      variable sigfile = "$HOME/.signature"$;
   
      if (string_match (group, "^news", 1))
        sigfile = "${HOME}/.slrn_news_signature"$;
      else if (string_match (group, "^comp", 1))
        sigfile = "${HOME}/.slrn_comp_signature"$;
      else if (group == "alt.test")
        sigfile = "${HOME}/.slrn_alt_test_signature"$;

      set_string_variable ("signature", sigfile);
   }
   register_hook ("article_mode_hook", &set_signature);

That is all there is to it.  Of course you will need to create the
appropriate signature files and add your own tests.

Finally note the use of the $ suffix on the strings.  It indicates
that the ${variables} are to be expanded.

Good luck,
--John
Re: [slrn] signature selection dependent on hierarchy, howto?
#230565
Author: wannes
Date: Sun, 22 Feb 2009 15:29
53 lines
3085 bytes
houghi schreef:
> wannes wrote:
>>> No URL, but I have the script. Is the h @ h .org mail valid?
>
> Yes, it is.
>
>> Your google-skills are disappoint me houghi. ;-)
>> http://ftp.slackware.pl/pub/splack/splack-10.1/boot/initrd/var/adm/setup/tmp/slrn-pl-1.4.3-2/macros/identity.sl
>
> Or http://tinyurl.com/bltr9r for thise who prefer their browser links
> not to wrap or go beyond what they can see. ;-)
>
> What did you use as searc?

identity.sl

> Nice to see that folding is done when opening it with gvim. :-D
>
> Now I just need to figure out how to use it. Looks like a lot of
> overkill for just changing the sig per group. :-/

I didn't have any problems whatsoever.

In my ~/.slrnrc there is: 
interpret .news/identity.sl
interpret .news/identities.sl

identity.sl is the file you have
identities.sl is a self-made file: an example

% -*- mode: slang; mode: fold -*-
%
identity->add_new ("pandora", "^pandora");
%  identity->set_from ("id", "username", "hostname");
%  identity->set_real ("id", "realname");
%  identity->set_replyto ("id", "reply-to");
identity->set_signature ("pandora", "/home/wannes/.pandora-sig");
%  identity->set_signoffstring ("id", "signoff_string");
%  identity->set_followupstring ("id", "followup_string");
%  identity->set_replystring ("id", "reply_string");
%  identity->set_customheaders ("id", "custom_headers");
%  identity->set_followupcustomheaders ("id", "followup_custom_headers");
%  identity->set_replycustomheaders ("id", "reply_custom_headers");
%  identity->set_regexp ("id", "regular_expression");
%  identity->set_saveto ("id", "save_to_file");
identity->set_description ("pandora", "Alle pandora-groepen");
%

Even for someone like me with zero-coding-skills this is easy. :)

-- 
wannes
<http://www.briachons.org/>
Re: [slrn] signature selection dependent on hierarchy, howto?
#230569
Author: Frank Slootweg
Date: Sun, 22 Feb 2009 15:57
23 lines
1747 bytes
wannes <me@nospam.invalid> wrote:
> Michael Grimm schreef:
> > Hi -
> >
> > Please ignore my ignorance, but I cannot find a way to select my
> > signature by means of hierarchy I'm posting to.
> >
> > e.g. comp.ALL --> siganture1
> >      news.ALL --> signature2
> >      and so on
> 
> identity.sl can do that.

$ANNOY PJR ON

  *Real* newsreaders can do that, *and* much, much [1] more, out of the
box! :-)

[1] Well, 'only' some 35 other settings, not counting all possible
headers. See the 'attributes' file in tin(5)
(<http://www.tin.org/bin/man.cgi?section=5&topic=tin>).

$ANNOY PJR OFF
Re: [slrn] signature selection dependent on hierarchy, howto?
#230573
Author: Urs Janßen
Date: Sun, 22 Feb 2009 17:02
9 lines
1685 bytes
Frank Slootweg wrote:
> [1] Well, 'only' some 35 other settings, not counting all possible
> headers. See the 'attributes' file in tin(5)
> (<http://www.tin.org/bin/man.cgi?section=5&topic=tin>).

tin >= 1.9.5 (not released yet) comes with a build-in attributes menu
(like the tinrc menu) so you don't have to edit the attributes file
manually. most settings (about 70) from the tinrc can also be set via
attributes.
Re: [slrn] signature selection dependent on hierarchy, howto?
#230574
Author: houghi
Date: Sun, 22 Feb 2009 17:19
19 lines
1807 bytes
John E. Davis wrote:
> On Sun, 22 Feb 2009 15:19:56 +0100, houghi <houghi@houghi.org.invalid>
> wrote:
>> And it is. Here a list of hurdles I needed to take and why I did not
>> succeed.
>
> Try a variation of the following.  In your .slrnrc file, put:

<snip>

To me that is much more logical then what was described in the
identity.sl file.

houghi
-- 
This was written under the influence of the following:
|  Artist : Santana
|    Song : Jugando
|   Album : Very Best Of
Re: [slrn] signature selection dependent on hierarchy, howto?
#230575
Author: houghi
Date: Sun, 22 Feb 2009 17:23
34 lines
2219 bytes
wannes wrote:
>> What did you use as searc?
>
> identity.sl

Did the same, but got 60.000.000 results and the o9nces O looked at
where pointing somewere else.

>> Nice to see that folding is done when opening it with gvim. :-D
>>
>> Now I just need to figure out how to use it. Looks like a lot of
>> overkill for just changing the sig per group. :-/
>
> I didn't have any problems whatsoever.
>
> In my ~/.slrnrc there is: 
> interpret .news/identity.sl
> interpret .news/identities.sl
>
> identity.sl is the file you have
> identities.sl is a self-made file: an example
<snip>
> Even for someone like me with zero-coding-skills this is easy. :)

I did not understand that the rest needed to be in that 'other file' as
well. It works now, thanks.


houghi
-- 
This was written under the influence of the following:
|  Artist : Santana
|    Song : Let The Children Play
|   Album : Very Best Of
Re: [slrn] signature selection dependent on hierarchy, howto?
#230576
Author: Michael Grimm
Date: Sun, 22 Feb 2009 17:24
38 lines
2645 bytes
John E. Davis <jed@jedsoft.org> wrote:

> In "/path/to/slrn-signature.sl", put:
>
>    private define set_signature ()
>    {
>       variable group = current_newsgroup ();
>       variable sigfile = "$HOME/.signature"$;
>    
>       if (string_match (group, "^news", 1))
>         sigfile = "${HOME}/.slrn_news_signature"$;
>       else if (string_match (group, "^comp", 1))
>         sigfile = "${HOME}/.slrn_comp_signature"$;
>       else if (group == "alt.test")
>         sigfile = "${HOME}/.slrn_alt_test_signature"$;
>
>       set_string_variable ("signature", sigfile);
>    }
>    register_hook ("article_mode_hook", &set_signature);
>
> That is all there is to it.  Of course you will need to create the
> appropriate signature files and add your own tests.

Thank you! It works, almost ;-) Whenever I start slrn and start with
posting to a newsgroup then .signature will be used, and not the ones
defined in this macro. Whenever I start slrn and start with making a
follow-up to an article (right now to yours) then everything works as
expected.

Any idea what to modify?

JFTR: I extended it to modify signoff_string as well. But, same
behavior regarding way of first usage.

Regards,
Michael
-- 
news hierarchy signature
Re: [slrn] signature selection dependent on hierarchy, howto?
#230590
Author: John E. Davis
Date: Mon, 23 Feb 2009 00:29
14 lines
1759 bytes
On Sun, 22 Feb 2009 17:24:27 +0000 (UTC), Michael Grimm <trashcan@odo.in-berlin.de>
wrote:
> Thank you! It works, almost ;-) Whenever I start slrn and start with
> posting to a newsgroup then .signature will be used, and not the ones
> defined in this macro. Whenever I start slrn and start with making a
> follow-up to an article (right now to yours) then everything works as
> expected.

Also add it to post_hook:

   register_hook ("post_hook", &set_signature);

Thanks,
--John
Re: [slrn] signature selection dependent on hierarchy, howto?
#230601
Author: Michael Grimm
Date: Mon, 23 Feb 2009 20:23
11 lines
1627 bytes
John E. Davis <jed@jedsoft.org> wrote:

> Also add it to post_hook:
>    register_hook ("post_hook", &set_signature);

Thanks. It's working perfectly well, now.

Regards,
Michael
-- 
to let
Re: [slrn] signature selection dependent on hierarchy, howto?
#230603
Author: Allodoxaphobia
Date: Mon, 23 Feb 2009 22:37
27 lines
2256 bytes
On 23 Feb 2009 00:29:58 GMT, John E. Davis wrote:
> On Sun, 22 Feb 2009 17:24:27 +0000 (UTC), Michael Grimm <trashcan@odo.in-berlin.de>
> wrote:
>> Thank you! It works, almost ;-) Whenever I start slrn and start with
>> posting to a newsgroup then .signature will be used, and not the ones
>> defined in this macro. Whenever I start slrn and start with making a
>> follow-up to an article (right now to yours) then everything works as
>> expected.
>
> Also add it to post_hook:
>
>    register_hook ("post_hook", &set_signature);

I'm unclear where this is to be added.  Or, do I have what's needed in 
identity.sl already?:

   !if (1 == register_hook ("post_hook", "identity->assign"))
     error ("identity.sl: register_hook (post_hook)");

   !if (1 == register_hook ("followup_hook", "identity->assign"))
     error ("identity.sl: register_hook (followup_hook)");

Jonesy
-- 
  Marvin L Jones    | jonz          | W3DHJ  | linux
   38.24N  104.55W  |  @ config.com | Jonesy |  OS/2
    * Killfiling google & XXXXbanter.com: jonz.net/ng.htm
Re: [slrn] signature selection dependent on hierarchy, howto?
#230606
Author: John E. Davis
Date: Mon, 23 Feb 2009 23:08
24 lines
2455 bytes
On 23 Feb 2009 22:37:53 GMT, Allodoxaphobia <bit-bucket@config.com>
wrote:
> I'm unclear where this is to be added.  Or, do I have what's needed in 
> identity.sl already?:
>
>   !if (1 == register_hook ("post_hook", "identity->assign"))
>      error ("identity.sl: register_hook (post_hook)");
>
>   !if (1 == register_hook ("followup_hook", "identity->assign"))
>      error ("identity.sl: register_hook (followup_hook)");

That looks ok, assuming that identity->assign is the name of the hook.

slrn supports a number of hooks, and because some overlap, it is not
always clear which one should be used.  For example, the original
poster want to set the signature based upon the name of the current
newsgroup.  So, I suggested using the "article_mode_hook", which gets
run when article-mode is entered.  The advantage of using the
"followup_hook" instead of "article_mode_hook" is that you can
customize the name of the signature file on an article-by-article
basis.  In that sense, it may be a better choice than the
"article_mode_hook".

--John
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