
 randonsig v1.10.0 is (c) 2001 Suso Banderas
=====================-----------------------

  Description - randomsig is a program that makes it easy to
		generate random signatures for each email
		without the use of a crontab entry.  

  This program is primarily designed around reading signatures in
from multiple files(especially from your mailboxes), filtering out
what you want and then choosing a random line from the lines that
made "the cut".

  If you have any bug fixes or suggestions to improve this program,
please see the "Contact" section of this document .  A list of
planned features is in the 'TODO' file included with this program.


  Installation
  ------------

  'randomsig' doesn't require that you be the root user on a machine
to make use of it.  Although there is a Makefile that comes with the
program to allow you to install the program in a global directory where
everyone can use it.  Just run  'make install'  if you wish to do so.

  If you're just a normal user put randomsig somewhere in your home directory
(I usually make a bin directory in my homedir for such programs).  You should
also copy the files .randomsigrc and optionally .sigread, .sigcancel and
.sigquotes to your home directory.

  Edit the .randomsigrc file to meet your configuration needs.  There
is a good description above each configuration value.  The configuration
is basically like a Perl script.

  Create a .sigread file that holds the template format of your signature.
This file will be used to generate your signature file each time it gets
created.  For you to make use of the program you should put the string 
$randomline somewhere in the file, which is where the randomline generated
by the program will be put.

   How to use
   ----------

  Simply run it from your like this:

   [suso@suso.org ~]$ randomsig

  The program forks itself off to the background and will stick around even
after you exit the shell.  If you want to terminate the process you must do:

	'kill <pid>'  where <pid> is the process id of randomsig.
        or
	'killall randomsig'

  If you want to re-read your configuration while the program is running you
can send randomsig a HUP signal by doing 'kill -HUP <pid>' or
'killall -HUP randomsig'.

  Configuration of the program is done through a '.randomsigrc' file in your
home directory.  This file controls nearly all aspects of the program
except what your sig will look like and the data from which the random
signatures are generated.  A sample and extensive '.randomsigrc' file comes
with the program and has lots of documentation on the configuration files that
you can use.

  Your signature format is configured in a file called '.sigread' that must
exist in your home directory.  In order to take advantage of the randomness
of the randomsig program, you should put the string '$randomline' in this
file somewhere.  This file doesn't need to have the "double dash" string
in it because randomsig will generate it for you as a standard.

  Sometimes there may be lines in a file that you do not want to include
in your randomline spool but you don't want to have to write a complicated
regular expression to match what you want.  For this you can use a file
called '.sigcancel' that contains one regular expression per line of what
lines you want to filter out.  A sample '.sigcancel' file has been
included with the program for your convience.

   History
   -------

   'randomsig' started out as my own personal signature generator for email.
My colleages at work (Kiva Networking) had been writing random sig programs
that simply pulled quotes from a static file that contained lines that they
entered.  My gimick was to write a sig generator that would pull quotes
directly out of my email.  Thus giving some true randomness to the whole
thing as well as providing some interesting and sometimes humorous
coinsidences between the subject matter of the email and the random sig
that popped up.  If I ever needed to censor the randomsig because it gave
away something that shouldn't have been seen by the people I was sending
the email to I could just cancel the message and hit the compose message
again, or I could put a cancel line in .sigcancel that would not read
that line. UPDATE:  In vim I created a key binding that allows me to easily
switch signatures if I don't like the one I have when I start composing a
message:

map <F1> /^-- <CR>d}:read ~/.signature<CR>

   Eventually I decided to beef it up for more(and easier) configurability as
well as make it more efficient.  One way I did this was by turning it into a
program that uses a named pipe to produce it's output instead of running from
a crontab every 5 minutes.

   The next step in the randomsig evolution was to make the program fork to the
background so that you don't have to both with(or know about) process control in
your shell.  Although it's probably a good thing to know about anyways. ;-)
This feature was added for the version 1.9 release.

  One of the features I've wanted to work out for version 1.9 is a method for
the files to be re-read without blocking IO on the named pipe.  At first I
thought I would just be able to do this with a select statement, but soon
discovered that it would be nearly impossible because of the nature of
how a named pipe works.  The only way I can think of to make this work now is
to make the program spawn off a child process that serves "read requests" while
the parent process does the reading of the quotes files.  Then the programs
could use some kind of IPC to communicate.  Maybe this will happen in a 
future release.

  Now I've decided to depreciate the named pipe feature because it is causing
problems for people who use some programs like 'pine' that don't deal well
with reading a .signature from a named pipe.  The program now will check to
see if the .signature file has been read since the last time the program wrote
to it.  If so, then write a new signature out to the file.


  Contact
  -------

  Please send bug reports, suggestions, requests or correspondence to Suso Banderas
  at 'suso@suso.org'.  You can visit the homepage for this program at:

   http://suso.suso.org/programs/randomsig/
