🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #259907

Re: [slrn] Modify signature based on newsgroup

#259907
From: J.B. Nicholson
Date: Sat, 09 Jan 2016 06:03
29 lines
2243 bytes
Lewis <g.kreme@gmail.com.dontsendmecopies> wrote:
> Would it be possible to do something like the following:
>
> if posting to newsgroup [alt.foo]
>    append .foo_signature
>    append .signature

With a macro, yes. Check out
http://slrn.sourceforge.net/docs/slrn-FAQ-2.html#ss2.8 which refers to
identity.sl (which you can get from
http://slrn.sourceforge.net/macros/identity.sl).

Since your setup handles changing the content of .signature externally
to slrn, I think the only part you'll need some code changes to handle
have to do with appending another file before .signature and
re-reading the files in order each time you need to generate a new
signature.

Perhaps if you made

  identity->set_signature ("id", "/path/to/.signature");

take an arbitrary number of file arguments, you could have
set_signature() append them all and set that signature, and then have
the post and followup hooks handle re-reading from these file(s) so
slrn gets a new signature with each post or followup.

I haven't taken a close enough look at the code to see if that's the
best strategy, but I'm guessing it's fairly close.
Technical Details
Message-ID: <slrnn918mb.hd9.jbn@forestfield.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
References: <slrnn8vlkv.1uv8.g.kreme@amelia.local>

Show Full Headers
Complete Article Headers
Message-ID: <slrnn918mb.hd9.jbn@forestfield.org>
Subject: Re: [slrn] Modify signature based on newsgroup
Date: Sat, 09 Jan 2016 06:03:55 +0000
From: "J.B. Nicholson" <jbn@forestfield.org>
References: <slrnn8vlkv.1uv8.g.kreme@amelia.local>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail
Newsgroups: news.software.readers
Organization: albasani.net
Lines: 29
X-Trace: news.albasani.net vHT7O/2qoAkCOnX4H1LBNM0pln2U3ZZVXC4qBWDpgE1MlOnFxFnKrKBOiNHL4hvg2G4h1LF2o6o4WfT+RDeNqg==
NNTP-Posting-Date: Sat, 9 Jan 2016 06:03:55 +0000 (UTC)
Injection-Info: news.albasani.net; logging-data="pYKcRR4At3OqU1QnN7FCyfHomrIrqMi0RJEBPAKj//jt+htyt7v/Vr3GXXKjlJvbcjcZ9t2tNKpsueaSAajQ740TCKnyRmmqxFJBPC8OiSeE5ZeKZj0MM/1K0co9981m"; mail-complaints-to="abuse@albasani.net"
User-Agent: slrn/1.0.2 (Linux)
Cancel-Lock: sha1:YaY0Db+bs/+KvAv2RkkqUmhXbeA=
X-Received-Bytes: 2090
X-Received-Body-CRC: 342998162