SIGNIFY(1) | Generate Semi-Random Signatures | SIGNIFY(1) |
signify - Program to generate semi-random signatures
signify [--fifo=$HOME/.signature] [--input=file] [--debug]
Signify will take a signature description file ( ~/.signify or whatever file is specified by the --input=<file> option ) and create a random signature based on the information contained therein. This allows the ability to do such things as pick a random quote for each message sent.
Signify, by default, will write the generated signature to standard output from where it can be redirected to overwrite the .signature file. Alternatively, Signify can pipe it's output to a given 'fifo'. Each read from that file will return a different signature.
To use the FIFO feature, delete the current "$HOME/.signature" file and start Signify in the background like "signify --fifo=$HOME/.signature &". With this running, try "cat $HOME/.signature" a few times. A different signature will be returned each time. (Note: This feature will probably work only on unix systems.)
The --debug switch causes Signify to generate messages on what it is doing to stderr. This switch is only meant to be useful to the program's maintainers.
The definition for the generated signatures is contained entirely within the .signify file contained in the user's home directory. Any completely empty lines (lines with even a single space are considered part of the signature data) and those lines starting with a hash character (#) are completely ignored. Those lines starting with a percent sign (%) are considered commands and affect the way Signify behaves.
Perl Command Substitution
Signify can execute an arbitrary perl code fragment during the initial reading of the configuration file. This can be used, for example, to choose values or text depending on the environment in which Signify is being run. To use this feature, simply enclose the desired perl code in back-tics (i.e. `perl code`). Whatever the perl code evaluates to will be substituted in that spot. No further variable substitutions are made on the resulting text. Signify is intelligent enough to recognize two back-tics together (often used as a better looking quotation mark) as not being a code fragment. Thus, writing something like "``Stop,'' she said." will appear as expected. Note: The entire code fragment must be contained on a single line of the input file.
Defining Variables
Signify will substitute variables within each line of the signature in much the same way as the shell would. Any sequence of $WORD; will be replaced by the value corresponding to the name "WORD". Case is significant but the trailing semicolon may be omitted if the next character is not a letter, digit, or underscore. By default, these variables look up values inside the environment variables, but can also be defined or redefined within the .signify file itself with a command such as:
% $email=myid@mycompany.com
Everything after the equal sign (=) is considered part of the value. Variables can be used in the definition of other variables. As a special case, $$ will evaluate to a single dollar sign ($).
The special variable SIGWIDTH can be used to set the desired output width of the generated signature. By default, this variable has the value "79". There is also a BLANK variable you can place on a line to create a totally empty line when the signature is output.
Including Other Files
You can tell Signify to read another file in place of the current line with a command like:
% include $HOME/.signify-quotes
For convienence, you can use a tilde (~) instead of $HOME to read a file relative to your home directory.
Creating Alternates
An unlimited number of "alternates" can be specified by using the "{", "|", and "}" commands. When the signature is generated, only one of all the possible alternates will be output. For example:
% { This is the first possibility. % | This is the second possibility. % | This is the third (and last) possibility. Note that alternatives can span multiple lines. % }
Creating Columns
Signify will automatically create side-by-side columns with nice, even spacing by using the "(", "|", and ")" commands. When output, everything will be padded out with spaces to fit nicely on the line. For example:
% ( This is the first column. % | This is the second. % | This is the third (and last) column. % )
Nesting Sections
Alternates and columns can be nested to any depth, though this can quickly become unwieldy and may not work exactly as expected, especially with columns. As a general rule, only supply alignment options (eg. "center", "right") at the most outside level to do any text formatting. For example, if supplying multiple "alternates" within a column, put the alignment options on the column and not on the alternates.
Section Command Options
The "alternates" and "columns" commands can take options to alter how they behave. The following is a list of supported options and what they do, though not all have meaning for both types of section. Multiple options can be specified by separating them with a comma (,).
Let's face it: Somebody has to pay for all software that gets written. Whether it is the time donated by the programmer or the salary donated by the company, everything has its cost. Signify has been made available to the general public in the hope that it will be useful and thus help raise the visibility of the people that sponsored its creation. In this way, the cost of creating Signify is offset by the publicity gained. If you use this program and would like to further the development of such software, it is asked (but by no means required) that you put something like the following in the quotes section of your .signify file.
% | center, weight=0.1 Generated by $PROGRAM. For this and more, visit $WEBSITE
(for single-line quote) or (for multi-line in a column)
% | weight=0.1 This signature was automatically generated with $PROGRAM. For this and other cool products, check out $WEBSITE
These are weighted very low (though you are more than welcome to increase these weightings :-) and will thus show up in your signature only occasionally. The variables are defined internal to Signify and provide the program name (including version number) and the web site where it can be found. We thank you for your support!
Please report any bugs to: bcwhite@pobox.com
Signify was written and documented by Brian White <bcwhite@pobox.com> on August 24th, 1996.
Signify has been placed in the public domain, the only true "free". It would be apprecated if copies of any improvements or bug-fixes would be sent to the author in order to be incorporated into the main upstream code and propogated to all users of this software.
Public domain by Brian White | 96.08.24 |