Re: debian newbie "tip-of-the-day" signature script
"Karsten M. Self" wrote:
> on Tue, Apr 24, 2001 at 12:24:01AM -0500, will trillich (firstname.lastname@example.org) wrote:
> > in ~/.muttrc:
> > # pipe randomized 'tip' from perl script--
> > send-hook debian- "set signature='~/.signature-debian |'"
> > # any email going out to any address containing "debian-"
> > # gets the output of ~/.signature-debian as a signature block
whoops, gotta clarify that--
since mutt scans the send-hooks in order EACH TIME you start
to generate an outgoing message, it'll set signature= on
the first outgoing debian message, and then it'll be stuck
that way, thereafter. to fix this (so you don't send a newbiedoc
hint to aunt marge, for example) i had to insert
send-hook .* "set signature='~/.signature'"
BEFORE the debian- send-hook, so that the signature variable
gets reset each time i send a new message.
is this kind of thing legal?
send-hook (.*)- "set signature='~/.signature-random $1'"
> > and in ~/.signature-debian
> > #!/usr/bin/perl
> > # by email@example.com
> > <...etc...>
> Clever. Most convoluted I ever got was system uptimes. Speaking of
> How big is that tips database of yours? IMO that would be an
> *excellent* add to the fortune package.
not very, not yet. when i see question #X go by for the tenth
time in a month, i add a quickie (and hopefully i don't get them
wrong). short answer: 26 so far. i try to keep them under four
lines, but that ain't always feasible. (eight is my max at the
> Have you considered implementing this as a fortune type deal rather than
> your perl script?
hadn't come up with that concept yet, no. i had condered using
it in the same fashion, tho -- maybe as a /etc/motd munger via
crontab, for example. i guess it's a simple matter to add a new
fortune-like database, hmm? i wonder if it'd be difficult to
add new tips to the end...
what i had considered, tho, is rube-goldberg-ing a web page allowing
anyone to add tips (with heavy regex behind to scenes to check for
duplication) of their own, and then offer a random tip via a finger-like
service on a publicly-accessible port, to the community at large.
i got this idea from the postgresql "pg-general" mailing list; they
append a random tip to each outgoing message. (i've only seen five
distinct tips, which ain't too impressive, but the concept is gold.)