From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] new in svn: hook system and polling hooks
Date: Sat, 18 Aug 2007 18:03:57 -0700 [thread overview]
Message-ID: <1187484773-sup-6336@south> (raw)
I've added a system for hooking user-created code into Sup. (Finally!)
Sup hooks take the form of Ruby scripts, placed in ~/.sup/hooks. Each
hook corresponds to a file in that directory. To see documentation on
the available hooks, just run "sup -l".
Hooks are passed information in the form of local "variables" (really
method calls, so don't try assigning to them). There are two
Sup-specific functions they can call, "say" and "log". "say" will write
a temporary message to the bottom portion of the screen, which is erased
when the hook stops executing. "log" will write a message to the sup
log.
There are only two hooks right now, before-poll and after-poll.
Before-poll should satisfy the desire of fetchmail users and after-poll
should satisfy the desire of all xbiff users.
Future work:
Allow sharing of information between successive invocations via instance
variables; and add lots of hooks (some kind of mime handler is probably
my immediate goal.)
--
William <wmorgan-sup at masanjin.net>
next reply other threads:[~2007-08-19 1:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-19 1:03 William Morgan [this message]
2007-08-20 1:30 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1187484773-sup-6336@south \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox