[sup-talk] new in svn: signature generation hook

William Morgan wmorgan-sup at masanjin.net
Fri Aug 31 12:09:10 EDT 2007


Check out my new awesome sig. I made it by putting this code in
~/.sup/hooks/signature.rb:

  if from_email
    title = "War Lord of the Sup"
    padding = " " * (73 - title.length - from_email.length)
    <<'EOS' +
  _____________________________________________________________________________   
  |                                                                           |   
  |        |                          \ | /                          |        |   
  |        |\                          \|/                          /|        |   
  |  |XXXXX||>>>>>>>>>>>>>>>>>>>>>>>  ((*))  <<<<<<<<<<<<<<<<<<<<<<<||XXXXX|  |   
  |        |/                          /|\                          \|        |   
  |        |                          / | \                          |        |   
  |                                                                           |   
  | Death Star                                                                |   
  EOS
    <<EOS
  | #{title}#{padding}#{from_email} |                                             
  |___________________________________________________________________________|   
                                                                                  
  EOS
  end

Here's the hook documentation:

  File: ~/.sup/hooks/signature.rb
  Generates a signature for a message.
  Variables:
        header: an object that supports string-to-string hashtable-style access
                to the raw headers for the message. E.g., header["From"],
                header["To"], etc.
    from_email: the email part of the From: line, or nil if empty
  Return value:
    A string (multi-line ok) containing the text of the signature, or nil to
    use the default signature.

Have fun,

-- 
_____________________________________________________________________________
|                                                                           |
|        |                          \ | /                          |        |
|        |\                          \|/                          /|        |
|  |XXXXX||>>>>>>>>>>>>>>>>>>>>>>>  ((*))  <<<<<<<<<<<<<<<<<<<<<<<||XXXXX|  |
|        |/                          /|\                          \|        |
|        |                          / | \                          |        |
|                                                                           |
| Death Star                                                                |
| War Lord of the Sup                              wmorgan-sup at masanjin.net |
|___________________________________________________________________________|


More information about the sup-talk mailing list