irc-logger-procs.tcl

Procs used by the irc-logger module.

Location:
packages/irc-logger/tcl/irc-logger-procs.tcl
Created:
2003-01-27
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
CVS Identification:
$Id: irc-logger-procs.tcl,v 1.12 2022/10/05 07:58:50 gustafn Exp $

Procedures in this file

Detailed information

dom::xpathFunc::irc::logger::user_link (public)

 dom::xpathFunc::irc::logger::user_link ctxNode pos nodeListType \
    nodeList [ args... ]

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: {<type> <value>}. The possible types at the moment are: "bool", "number", "string", "nodes".

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.

Parameters:
ctxNode (required)
See tDOM documentation.
pos (required)
See tDOM documentation.
nodeListType (required)
See tDOM documentation.
nodeList (required)
See tDOM documentation.
Returns:
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.
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-01-31

Partial Call Graph (max 5 caller/called nodes):
%3 ad_acs_kernel_id ad_acs_kernel_id (public) db_0or1row db_0or1row (public) export_vars export_vars (public) parameter::get parameter::get (public) dom::xpathFunc::irc::logger::user_link dom::xpathFunc::irc::logger::user_link dom::xpathFunc::irc::logger::user_link->ad_acs_kernel_id dom::xpathFunc::irc::logger::user_link->db_0or1row dom::xpathFunc::irc::logger::user_link->export_vars dom::xpathFunc::irc::logger::user_link->parameter::get

Testcases:
No testcase defined.

irc::logger::apply_xslt (public)

 irc::logger::apply_xslt -rdf_log rdf_log -xsl_style xsl_style \
    [ -package_id package_id ]

Transform the RDF IRC log to HTML using passed XSL stylesheet.

Switches:
-rdf_log (required)
The full path to the IRC log in RDF format
-xsl_style (required)
The full path to the XSL stylesheet to transform the RDF log into HTML with.
-package_id (optional)
Returns:
The transformed IRC log in HTML.
Error:
Return the empty string.
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-01-27

Partial Call Graph (max 5 caller/called nodes):
%3 irc::logger::update_log irc::logger::update_log (public) irc::logger::apply_xslt irc::logger::apply_xslt irc::logger::update_log->irc::logger::apply_xslt dom dom irc::logger::apply_xslt->dom

Testcases:
No testcase defined.

irc::logger::get_log (public)

 irc::logger::get_log -date date -package_id package_id

Check which .rdf file holds the current IRC log in RDF format as created by Dave Beckett's logger.

Switches:
-date (required)
The date in YYYY-MM-DD format to get the IRC log of.
-package_id (required)
The package_id of the mounted IRC logger instance to get the log for.
Returns:
The full path to the IRC log in RDF format.
Error:
Return the empty string
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-01-27

Partial Call Graph (max 5 caller/called nodes):
%3 irc::logger::update_log irc::logger::update_log (public) irc::logger::get_log irc::logger::get_log irc::logger::update_log->irc::logger::get_log parameter::get parameter::get (public) irc::logger::get_log->parameter::get

Testcases:
No testcase defined.

irc::logger::rotate_logs (public)

 irc::logger::rotate_logs -package_id package_id [ -all ]

Rotate the ETP pages so that the ETP page with the new log is listed first instead of last. Please be aware that changes to the sort order through of these logs through ETP might have undesired side effects to the order. This an artifact of ETP and not of the IRC logger.

Switches:
-package_id (required)
The package_id of the ETP instance that is the parent of the ETP log pages.
-all (optional, boolean)
Returns:
none
Error:
none
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-02-18

Partial Call Graph (max 5 caller/called nodes):
%3 irc::logger::update_log irc::logger::update_log (public) irc::logger::rotate_logs irc::logger::rotate_logs irc::logger::update_log->irc::logger::rotate_logs db_dml db_dml (public) irc::logger::rotate_logs->db_dml db_foreach db_foreach (public) irc::logger::rotate_logs->db_foreach db_map db_map (public) irc::logger::rotate_logs->db_map db_string db_string (public) irc::logger::rotate_logs->db_string

Testcases:
No testcase defined.

irc::logger::scheduled_update (public)

 irc::logger::scheduled_update -package_id package_id

Scheduled procedure to check for updates of today's IRC log.

Switches:
-package_id (required)
The package_id of the mounted IRC logger instance to get the log for.
Returns:
none
Error:
none
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-01-27

Partial Call Graph (max 5 caller/called nodes):
%3 irc::logger::update_log irc::logger::update_log (public) irc::logger::scheduled_update irc::logger::scheduled_update irc::logger::scheduled_update->irc::logger::update_log

Testcases:
No testcase defined.

irc::logger::update_log (public)

 irc::logger::update_log -date date -package_id package_id

Check the IRC log of the passed date associated with package_id. Transform the RDF log to HTML if the log has changed since the last time this proc was run. Then place the HTML log in an ETP page of the ETP instance that IRC logger is mounted under. The ETP page has the name of passed date.

Switches:
-date (required)
The date in YYYY-MM-DD format to get the IRC log of.
-package_id (required)
The package_id of the mounted IRC logger instance to get the log for.
Returns:
none
Error:
Write warning messages to the log were necessary.
Author:
Bart Teeuwisse <bart.teeuwisse@thecodemill.biz>
Created:
2003-01-27

Partial Call Graph (max 5 caller/called nodes):
%3 irc::logger::scheduled_update irc::logger::scheduled_update (public) irc::logger::update_log irc::logger::update_log irc::logger::scheduled_update->irc::logger::update_log packages/irc-logger/www/admin/update.tcl packages/irc-logger/ www/admin/update.tcl packages/irc-logger/www/admin/update.tcl->irc::logger::update_log acs_package_root_dir acs_package_root_dir (public) irc::logger::update_log->acs_package_root_dir apm_package_key_from_id apm_package_key_from_id (public) irc::logger::update_log->apm_package_key_from_id apm_package_url_from_id apm_package_url_from_id (public) irc::logger::update_log->apm_package_url_from_id db_0or1row db_0or1row (public) irc::logger::update_log->db_0or1row db_dml db_dml (public) irc::logger::update_log->db_dml

Testcases:
No testcase defined.
[ show source ]