procmail
[Top] [All Lists]

Re: Running script upon composition

1996-08-26 13:57:52

regarding your random signature chooser: 

I've tried to get this very thing to happen, but without success.  I tried
doing it in Perl, but my perl abilities are obviously less than your
abilities in whatever you used to write the script.

i haven't the foggiest whether procmail can do what you describe, but i'm
not sure it's necessary.  the way i conceived of writing my perl program
(even though it exceeded my current abilities) was to have it select a
random quote after a certain incremement of time passed.  so if you had it
chose a new one every ten minutes, then you most likely wouldn't every
write two letters to the same person during that period, and so only
because of a shortage of quotes or else random chance (as much as one can
get from a computer, anyway) would anyone see the same quote twice.  since
your quotes wouldn't be 'used up' in any sense, there's no reason not to
make the increment of time short.  the script would just run in the
background, and would copy (for instance) ~/quotes/q364.txt to
~/.signature, and when it was used to compose a message, pine would find
the new quote in the .signature file, and voila!

if i'm understanding you (and perhaps i'm not) then this would do
everything you wanted, with one possible exception:  it wouldn't allow you
to replace the quote with another *randomly* chosen one, in the event that
you thought that that particular quote might not be appropriate for the
person or occasion or whatever.  i suppose that that could be solved just
by making the increment of time after which the .signature file is
randomly replaced a much shorter one, then you could cancel the message
and hit 'c' again, and look at the new choice, until you found one you
like. 

does my suggested solution work?  please let me know if i'm missing
something. 

  -brandon

p.s. by the way, i'd be very interested in getting a copy of your sig
chooser if you're willing to pass it around. 



On Mon, 26 Aug 1996, athar shiraz siddiqui wrote:

This is exactly what i had in mind :
 I wrote an auto signature generator that randomly selects quotes/ 
taglines from a DB, whatever, and appends to the .signature file. Now in 
pine ( as confessed earlier ) I can see the .signature file appended to 
the end of my message, which I can modify or change as I will upon 
completion of composition ( the idea is to get random tasteful quotes but 
still have the ability of knowing and if desired changing the .signature )
Can I get that script running everytime I compose a letter,so that I get 
different quotes everytime, I compose a letter ( instead of my present 
one execution per session ).

<Prev in Thread] Current Thread [Next in Thread>