- Publicity: Public Only All
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
- dom::xpathFunc::irc::logger::user_link (public)
- irc::logger::apply_xslt (public)
- irc::logger::get_log (public)
- irc::logger::rotate_logs (public)
- irc::logger::scheduled_update (public)
- irc::logger::update_log (public)
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:
- 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):
- 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):
- 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):
- 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):
- 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):
- 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):
- Testcases:
- No testcase defined.