Rig autoload dir ?repos?
Prepare to autoload any rigs located in the specified directory, as well as one level below in sub-directories. If a repository url is specified, use that to auto-download new rigs.
Auto-loading and auto-downloading use Tcl's auto_index mechanism to load rigs on demand.
Rig bgerr msg
Used as default for the global "bgerror" command if it has not been defined elsewhere. This implementation will log a bit of information using "Rig log".
Rig catcher ...
Evaluate the arguments, ignoring any errors but logging them for reference.
Rig check cond
Assert the specified condition to be true. If not, the condition as well as its expanded form with actual values is logged. Aliased by default as global "Chk:".
Rig config ?name? ?default?
This is a simple configuration settings system. The "config" command retrieves the current value of the named parameter. If the parameter is absent or an empty string, a specified default can be returned instead.
Rig date ?type? ?secs?
Convert a unix seconds-since-1970 time to a printable date, in one of several formats:
- (empty) - use Tcl's default from "clock format"
- http - return an HTTP-formatted date
- iso - return an ISO8601-formatted date, local time
- isoUTC - return an ISO8601-formatted date, UTC time
If the type contains a percent sign, then it is used as format specifier for "clock format" instead.
Rig defined? cmd
Returns true if the given Tcl command exists.
Rig doc {...}
Rig documentation details, for use at the start of each source file.
Rig get vname ?default?
Return the contents of the specified variable, or the given default if the variable does not exist or contains an empty string.
Rig home
Return the application home directory.
Rig hook event cmd ?prio?
Define a notification hook for the specified event name. The priority defaults to 5, but you can specify a different value to make this hook run before or after other hooks for this event.
Rig loader name path ?url?
Load a rig from file. Sets up a namespace and ensemble, using "rig conventions".
Rig log msg
Generate a log message. The argument can contain $'s and \'s and will be substituted before getting logged. Aliased by default as global "Log:".
Rig msg cmd ...
Shorthand for access to Tcl's "msgcat" package used for internationalization. Also does a "package require msgcat" to make sure the code is loaded.
Rig msgdefs locale defs
Utility to process message catalogs using a slightly more compact notation. This is a thin wrapper around "msgcat::mcmset".
Rig notify event ...
Trigger a notification for the specified event. This will run any hooks defined for this event, in order of priority. The remaining arguments are passed on to each hook.
Hooks which generate errors will be unhooked to prevent further errors.
Rig options opts ?argv?
This fills in configuration settings for use by "Rig config".
Rig readfile name
Read the contents of a textfile and return it as string. Returns the empty string for files which could not be opened.
Rig readhttp url ...
A thin wrapper around Tcl's http::geturl.
Rig reload
Reload any changed source files next to the Rig.tcl file itself. Uses "Rig loader" to load/re-load such sources using rig conventions.
Rig tag ...
T.B.D.
Rig timestamp
Return the current time in milliseconds, formatted for use in logs. Example: "18:40:23.120".
Rig tracepoint type mask ...
T.B.D.
Rig uncomment text
Return text with comments removed, i.e. all lines starting with "#". Comments may be preceded by spaces, but a line such as "abc # def" is not considered to contain a comment.
Rig unhook event cmd
Remove a previously defined hook from the notification system.
Rig writefile name content
Save the specified content to a text file of the given name. This does not add an extra newline to what is passed in as content.