Moving this to tools-yak. (01)
On Mon, 1 Dec 2003, John Sechrest wrote: (02)
> Very cool. I am very interested to see the bits and recipe
> that put wiki work into everything. (03)
For a sample I've put the irclogger code here (04)
http://www.burningchrome.com:8000/~cdent/tools/irclogger/irclogger.tar.gz (05)
irclogger requires Net::IRC, AppConfig and PurpleWiki::Sequence
(which is part of the PurpleWiki distribution[1]). The first two
can be found on CPAN. (06)
In the way I'm using it, irclogger starts from SYSV init script,
irclogger.init (provided). Two robots are started, for two
different channels, using config files. A sample is provided. (07)
The config file describes the IRC server and channel, the
directory where the wiki pages and purple number sequence live,
urls, pathnames, greeting text, and various other stuff to make
the bot friendly. (08)
The bot listens on the channel. Whenever anyone says anything or
performs an action it takes that string, prepends the name of the
speaker formatted to make it a wiki link, appends the next
available purple number and writes it to a file for that day. (09)
The file ends in .wiki. The file is opened and closed with every
write so that when the date changes a new file is created easily.
I though this might be a performance problem, but it hasn't been. (010)
Because the text will later be interpreted by the wiki parsing
engine, any links or WikiWords will be highlighted at
presentation time and no doctoring is needed. (011)
If a new user connects they will be notified that the channel is
being logged, given the URL of today's log, and provided with the
last ten lines of conversation (which the bot has been caching).
This information is passed as a private message. (012)
If the bot hears its name, it will report a pithy phrase from a
file containing those phrases. (013)
Apache needs to be configured to provide a handler for files
ending in .wiki: (014)
<IfModule mod_perl.c>
PerlModule PurpleWiki::Apache1Handler
<FilesMatch "\.wiki$">
SetHandler perl-script
PerlHandler PurpleWiki::Apache1Handler
</FilesMatch>
</IfModule> (015)
PurpleWiki::Apache1Handler is part of the irclogger tarball.
There's also an Apache2 version around somewhere. (016)
This is the same handler that Arts uses. The text is read from
disk, passed through the purple wiki parser to create a tree. The
tree is then serialized as xhtml. WikiWords become links, purple
number become purple links, http and other URLs are made hot. (017)
If I find a little bug, transclusion from other sources would
work as well. This is a bit funky though. If you are chatting,
would you say "[t N45]"? It would only expose the text at that
NID in the log. I'm considering making the bot hear transclusions
and say the text that it would find. That would need to happen
out on a fork with a callback of some kind to avoid blocking. (018)
In the work setting the way we generally use the IRC channel and
logs is something like this: (019)
* Dude a, in Seattle, is considering a change. It's the middle of
the night, so I'm on the IRC channel too. (020)
* We talk about it, have some thoughts we think are smart, maybe
even come to a conclusion about what we think is best. (021)
* Dude a sends out some mail to the group list saying something
along the lines of: (022)
===
Chris and I were talking about decoupling document labels from
text entity identifiers. We think we decided to not do it for
now. What do you guys think? Here's the pointer to what we were
talking about: (023)
http://our.specialplace.com/irclog/kb/20031201.wiki#nid175A
=== (024)
* We talk about it some more. Reach a consensus. (025)
* Dude a writes a specification for the project which goes into
Arts. That arts document either references or transcludes
content from the mailing list and the irc log. (026)
* Later, as dude a works, he writes reports to the mailing list,
referencing individual milestones and steps (027)
The cost of setting all this up was not too high, given that the
PurpleWiki engine already existed and I was familiar with it. And
once it was all in place, it provides what feels to me like an
information safety net. Things don't get lost. (028)
[1] http://www.blueoxen.org/tools/purplewiki/index.html
--
Chris Dent cdent@blueoxen.org
Once you knew, once you really, really knew,
then you had lost your alibi. --Samantha Power (029)
--
This message is archived at: (030)
http://collab.blueoxen.net/forums/cgi-bin/mesg.cgi?a=tools-yak&i=Pine.OSX.4.53.0312011832360.3791@d-18-169.dhcp-129-79.indiana.edu (031)
|