Index: openacs-4/contrib/packages/irc-logger/ChangeLog
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/ChangeLog,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs-4/contrib/packages/irc-logger/ChangeLog 30 Jan 2003 02:48:43 -0000 1.1.1.1
+++ openacs-4/contrib/packages/irc-logger/ChangeLog 11 Feb 2003 21:36:14 -0000 1.1.1.2
@@ -1,5 +1,38 @@
-2003-01-29 Bart Teeuwisse Create a link to the user account on this site where the IRC
+ nick matches the user's screen name. Rolf (rolf@pointsman.de) from the tDOM team on tDOM extension
+ functions: If an XPath expr (both for the selectNodes method and in XSLT
+ stylesheets) uses a not standard XPath function name (you cannot
+ 'overwrite' the C coded standard built-in functions), the engine
+ looks, if there is a tcl proc with the given function name in
+ the ::dom::xpathFunc:: namespace. In other words: all extension
+ functions procs must reside in the namespace ::dom::xpathFunc or
+ in a child namespace of that namespace. If the XPath extension
+ function has a prefix, the prefix is expanded to the namespace
+ URI and that namespace URI must be the name of the child
+ namespace of the ::dom::xpathFunc namespace. If there is such a proc, this proc is called with the following
+ arguments: ctxNode pos nodeListType nodeList args. The 'args'
+ are, as type/value pairs, the arguments, that are given to the
+ extension functions. (E.g. if you have
+ myExtensionFunction('foo'), you will get two args, the first
+ "string" the second "foo"). The tcl proc, which implements the extension function must
+ return a list of two elements: { But don't get confused by my probably (too) vague
+ explanations. Just look at the examples in the xpath.test and
+ tdom.tcl files. For almost all 'real life' needs, you should get
+ it very fast, what to do from that usage examples. The following RDF log files are available in the RDF
+ directory ( Use View to visit the current ETP page of the log. Follow the Update link to re-apply
+ the XSL transformation to the RDF log(s). The log has no Update link if the RDF log is not writable by the
+ owner of this AOLserver process. Place logger under supervision using daemontools or crontab
+ href="http://cr.yp.to/daemontools.html">daemontools or crontab
to guarantee that the bot stays connected to the IRC channel it is
logging. tags from XSL sheet as they misfired too often.
+
+
+2003-01-29 Bart Teeuwisse
@@ -20,6 +22,7 @@
@@ -32,11 +35,16 @@
<
@@ -45,31 +53,74 @@
+
+
+ @author Bart Teeuwisse (bart.teeuwisse@thecodemill.biz)
+ @creation-date 2003-01-31
+
+ @param ctxNode See tDOM documentation.
+ @param pos See tDOM documentation.
+ @param nodeListType See tDOM documentation.
+ @param nodeList See tDOM documentation.
+
+ @param args A single (type, value) pair of type 'attrnodes' with
+ the nick of the IRC user.
+
+ @return A single (type, value) pair with a link to the user
+ account on the site. Or just the nick if no user account was found.
+
+ @error The empty string.
+
+} {
+
+ # Default return value
+
+ set link ""
+
+ # Limited parameter checking. The tDOM related parameters don't
+ # matter.
+
+ if {[llength $args] == 2} {
+
+ # Get argument type and value.
+
+ foreach {type value} $args {
+ break
+ }
+
+ # Check that the parameter an attribute node is and extract
+ # the value of the attribute.
+
+ if {[string equal $type "attrnodes"]} {
+ set nick [lindex [lindex $value end] end]
+
+ # Locate the first user with a screen name of 'nick' on this
+ # site. DB caching reduces the number of hits on the DB
+ # itself.
+
+ if {[db_0or1row get_user {}]} {
+ set link "$nick"
+ } else {
+ set link $nick
+ }
+ } else {
+ ns_log warning "dom::xpathFunc::irc::logger::user_link wrong parameter type '$type($value)'; type should have been attrnodes"
+ }
+ } else {
+ ns_log warning "dom::xpathFunc::irc::logger::user_link accepts only 1 parameter, received [llength $args] parameters"
+ }
+
+ return [list string $link]
+}
Index: openacs-4/contrib/packages/irc-logger/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/www/admin/index.adp,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs-4/contrib/packages/irc-logger/www/admin/index.adp 30 Jan 2003 02:48:49 -0000 1.1.1.1
+++ openacs-4/contrib/packages/irc-logger/www/admin/index.adp 11 Feb 2003 21:36:21 -0000 1.1.1.2
@@ -9,4 +9,46 @@
+ Parameters
+
+
+ RDF log files
+
+ @rdf_dir@
).
+
+
Index: openacs-4/contrib/packages/irc-logger/www/admin/index.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/www/admin/index.tcl,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs-4/contrib/packages/irc-logger/www/admin/index.tcl 30 Jan 2003 02:48:49 -0000 1.1.1.1
+++ openacs-4/contrib/packages/irc-logger/www/admin/index.tcl 11 Feb 2003 21:36:21 -0000 1.1.1.2
@@ -7,9 +7,11 @@
@creation-date 2003-01-29
@cvs $Id$
} {
+ {updated {}}
} -properties {
title:onevalue
-
+ rdf_dir:onevalue
+ rdf_logs:multilist
}
# Authenticate the user
@@ -34,3 +36,26 @@
} else {
set title "Administration"
}
+
+# Create a data source of remaining RDF log files in the log directory
+
+multirow create rdf_logs desc date view_href update_href
+set rdf_dir [parameter::get \
+ -parameter irc_rdf_dir \
+ -package_id $package_id \
+ -default ""]
+
+# First a link to update all RDF log files.
+
+multirow append rdf_logs "All RDF log files" "*" {} update?[export_vars -url {{date *}}]
+
+# Followed by links to individual RDF log files.
+
+foreach rdf_log [glob -nocomplain -directory $rdf_dir *.rdf] {
+ set date [file rootname [file tail $rdf_log]]
+ if {[file writable $rdf_log]} {
+ multirow append rdf_logs $date $date ../../$date update?[export_vars -url {date $date}]
+ } else {
+ multirow append rdf_logs $date $date ../../$date {}
+ }
+}
Index: openacs-4/contrib/packages/irc-logger/www/doc/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/irc-logger/www/doc/index.adp,v
diff -u -r1.1.1.1 -r1.1.1.2
--- openacs-4/contrib/packages/irc-logger/www/doc/index.adp 30 Jan 2003 02:48:49 -0000 1.1.1.1
+++ openacs-4/contrib/packages/irc-logger/www/doc/index.adp 11 Feb 2003 21:36:22 -0000 1.1.1.2
@@ -70,7 +70,7 @@
+
+
+
+
+
+ [
+
+
+
+
@package_name@ can be mounted more than once. Each instance processing the logs of a different bot.
+@package_name@ can be mounted more than once. Each instance + processing the logs of a different bot.
+@package_name@ will link to the user's profile and include the + full name for users of the site who have entered their IRC nick as + their OpenACS screen name.
+