Phenny Services Update

Showing 1-1 of 1 messages
Phenny Services Update
Sean B. Palmer
27/03/10 11:16
The Phenny IRC Bot that I wrote has a facility where people can add
web services to her on a wiki page. This has proven to be a rather
popular feature, and there are now over 80 new commands introduced by
this method. What happens is, there's a command to call a web service
called ".o". When you invoke a web service using it:

<sbp> .o example This is a test.

Phenny looks up the "example" service in her table, which is taken
from the wiki page. The wiki page has a mapping of service names to
URIs templates. She then constructs a URI from the URI template, so
that she might request something like the following:

http://example.org/service?This%20is%20a%20test.

This page then must respond with a single line of text, which Phenny
uses as the output from the command. This means that effectively
Phenny becomes distributed, collaborative, and language independent.

Anyway, the wiki page and some hosted tools have been governed by Noah
Slater on Google Code for ages now, but on some strange capricious
whim he decided to move the code and the wiki page to Github instead:

http://github.com/nslater/phenny-ws

The new service definitions page is here:

http://wiki.github.com/nslater/phenny-ws/

I've been thinking a bit about writing a Python 3 version of Phenny,
and what the services module might look like therein. If people really
are using it, it might be nice to have some of the commands be a bit
shorter. I already aliased .o py as just .py, because we use that
quite often. I did think about using a comma as a prefix for the web
services, but I don't want Phenny to conflict with other bots. Two
dots would look silly, and title case or CAPS similarly.

I suppose as a last resort I could have a path mechanism, where any
locally defined code comes first, and then if no such command can be
found it searches the web service list as a backup. That does increase
the chance that random inputs will accidentally set Phenny off,
though, which is not something I really want happening.