Signature calls the Quote script, gets a random quote from your quote file, and then inserts it into the middle or end of a file.
Using Signature
The easiest way to use Signature is to call it from Cron. I have the following lines in the Chris Johnson Cron’s crontab file:
//Generate new quotes 30 0 * * * Cerebus "Signature" "File=Space:pub:About Cerebus" "Quotes=Space:Tools:Quotes" "Delimiter=\r--\r" 35 0 * * * Cerebus "Signature" "File=Space:html:Cerebus.html" "Quotes=Space:Tools:Quotes" "Delimiter=\r<cerebus-break>\r" 40 0 * * * Jerry "Signature" "File=Space:etc:Signature" "Quotes=Space:Tools:Quotes" "Delimiter=address@domain\r" 45 0 * * * Jerry "Signature" "File=Space:System Folder:Eudora Folder:Signature Folder:Signature" "Quotes=Space:Tools:Quotes" "Delimiter=address@domain\r"
At 12:30 every morning, Signature generates a new quote at the end of the “About Cerebus” file; at 12:35, it generates a new quote at the bottom of Negative Space’s central web page. At 12:40, it generates a new quote for use by FireShare, and at 12:45 it generates a new quote for Eudora.
Here’s what you can tell it to do with cron:
File=filepath
This is the file that you want to give a new quote to. It must be a text file! If it isn’t, Signature will happily go and change it anyway, but so what? You’ve just ruined it is all.
You can also “drop” files onto Signature in order to change the signature, using the last “Quote” file that Signature used.
Quotes=filepath
This is the file containing the quotes you want to use. The quotes must be separated by a carriage return, a pound sign, and another carriage return—see the sample quote file in the distribution for an example. The default is the “Sample Quotes” file in the same directory as “Signature”.
Delimiter=what separates the quote from the body of the document
This is the text string that separates the quote from the “real” part of the document. For example, in the Negative Space home page, I surround the quote by <cerebus>the quote<cerebus>. Signature knows from this to take only the things between the two instances of “<cerebus>”.
In the case of a normal text file, you can use anything as the delimiter--in most of my straight text signatures, I have “address@domain” just before the “quote”. So that’s what I put in as my delimiter in “cron”, above.
- If there is only one instance of the delimiter, Signature assumes that everything after the delimiter is the quote, and replaces this.
- If there are two or more instances, Signature assumes that everything between the first and last instance of the delimiter is the quote, and replaces that.
The default delimiter is a carriage return, two dashes, and another carriate return.
Length=linesize
A number, the length at which lines need to get wrapped. The default is 72. Set it to 0 if you don’t want the lines to be wrapped at all.
Quoter=filepath
This is an applescript that returns the quote from the quotefile. Signature calls this script with the quote’s filename as the sole parameter. You’ll probably want to leave this as it is, which is the “Quote” script in the same directory as Signature.