🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #49079

Re: slrn and sigs from applications

#49079
From: Stephane Gibier
Date: Sat, 05 Jun 1999 00:00
43 lines
2239 bytes
Daniele Frijia <Daniele.Frijia@gelitten.infra.de> wrote :

> I want to know, if I can use the output of a program (e.g. fortune) for
> the sig.

Sure, you can. You have to add your signature generator in the editor
command, like this :

set signature ".signature"
set editor_command "vim %s +%d"
set mail_editor_command "randsig; vim %s +%d"
set post_editor_command "randsig; vim %s +%d"
set score_editor_command "vim %s +%d"

I have found on the Mutt homepage a simple perl script to extract from a
text file database a random signature. I have adapted it to use it with
slrn/mutt :

#!/usr/bin/perl
$sigline = 'St�phane Gibier <sgibier@mail.dotcom.fr>';
$home =  $ENV{"HOME"};
open (FI, "$home/.sigs") or die "Can't open $home/.sigs";
$sig[0] = 0;
while (<FI>) { $sig[$#sig + 1] = tell if /^$/; }
srand;
seek(FI, $sig[int rand ($#sig + .9999)], SEEK_SET) or die "Can't seek";
while (<FI>) { last if /^$/; $msg .= $_; }
open (SIG,">$home/.signature");
print SIG "-- \n$sigline\n$msg";
close SIG;

BTW, the signature database text file is .sigs. Each signature is
separated by one or more blank lines. The script adds the standard
signature delimiter "-- \n" automatically.

Fast, simple and efficient.

-- 
St�phane Gibier <sgibier@mail.dotcom.fr>
Elle a le choix dans la date
Ryyr n yr qbvtg qnaf yn punggr 

Technical Details
Message-ID: <slrn7lj196.jun.sgibier@hermes.olympus.fr>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn7lictn.469.Daniele.Frijia@gelitten.infra.de>

Show Full Headers
Complete Article Headers
Message-ID: <slrn7lj196.jun.sgibier@hermes.olympus.fr>
Subject: Re: slrn and sigs from applications
Date: Sat, 05 Jun 1999 00:00:00 +0000
From: sgibier@mail.dotcom.fr (Stephane Gibier)
References: <slrn7lictn.469.Daniele.Frijia@gelitten.infra.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 486183859
Content-Transfer-Encoding: 8bit
Mail-Copies-To: never
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@wanadoo.fr
X-Trace: wanadoo.fr 928634014 4300 164.138.60.99 (6 Jun 1999 01:53:34 GMT)
Organization: Olympus
User-Agent: slrn/0.9.5.6 (UNIX)
Mime-Version: 1.0
NNTP-Posting-Date: 6 Jun 1999 01:53:34 GMT
Newsgroups: news.software.readers