Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
* [sup-talk] new in svn: signature generation hook
@ 2007-08-31 16:09 William Morgan
  2007-09-03 12:40 ` jeff covey
  0 siblings, 1 reply; 2+ messages in thread
From: William Morgan @ 2007-08-31 16:09 UTC (permalink / raw)


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 |
|___________________________________________________________________________|


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-03 12:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-31 16:09 [sup-talk] new in svn: signature generation hook William Morgan
2007-09-03 12:40 ` jeff covey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox