🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
4 messages
4 total messages Started by Daniele Frijia Sat, 05 Jun 1999 00:00
slrn and sigs from applications
#49098
Author: Daniele Frijia
Date: Sat, 05 Jun 1999 00:00
15 lines
1078 bytes
Hiho

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


Regards, Daniele
-- 
 -                          -*-asklaskl-*-                                -
|     http://realcosmo.hat.gelitten.org -*- Realcosmo@IRCnet               |
|           realcosmo@ist.total.am.verpeilen.bei.infra.de                  |
|_-*- God made the world in six days, and was arrested on the seventh. -*-_|

Re: slrn and sigs from applications
#49077
Author: David Efflandt
Date: Sat, 05 Jun 1999 00:00
25 lines
1323 bytes
See 'man perlipc' and search for signature.  It has an example of a fifo
you can use in place of your .signature and do exactly that.

On 5 Jun 1999 14:27:03 GMT, Daniele Frijia
<Daniele.Frijia@gelitten.infra.de> wrote:
>
>Hiho
>
>I want to know, if I can use the output of a program (e.g. fortune) for
>the sig.
>
>
>Regards, Daniele
>-- 
> -                          -*-asklaskl-*-                                -
>|     http://realcosmo.hat.gelitten.org -*- Realcosmo@IRCnet               |
>|           realcosmo@ist.total.am.verpeilen.bei.infra.de                  |
>|_-*- God made the world in six days, and was arrested on the seventh. -*-_|


-- 
David Efflandt    efflandt@xnet.com
http://www.xnet.com/~efflandt/

Re: slrn and sigs from applications
#49079
Author: 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 

Re: slrn and sigs from applications
#49097
Author: Frank Hahn
Date: Sun, 06 Jun 1999 00:00
31 lines
1767 bytes
On Sat, 05 Jun 1999 22:27:04 -0400, David Efflandt <efflandt@xnet.com> wrote:
>See 'man perlipc' and search for signature.  It has an example of a fifo
>you can use in place of your .signature and do exactly that.
>
>On 5 Jun 1999 14:27:03 GMT, 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.
>
Someone asked this question in comp.os.linux.misc back in the middle
of May.  One of the responsders posted what I thought was a simple solution.



set editor_command "/usr/local/bin/fortune -s > /home/tim/.signature-news;vim %s


This is all one line.  Just change it to use your editor.

Then set:

set signature ".signature-news"

-- 
Frank Hahn

Pascal Users:
	To show respect for the 313th anniversary (tomorrow) of the
death of Blaise Pascal, your programs will be run at half speed.

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