Module pepper

General functions for interacting with the main program.

Functions

current_report () Returns the current report context.
list_reports () Returns a listing of all reports in the current search directories.
run (report, options) Runs a report script, using the current repository.
version () Returns the version of the main program as a string


Functions

current_report ()
Returns the current report context.

Return value:

A pepper.report instance

See also:

list_reports ()
Returns a listing of all reports in the current search directories.

Return value:

An array of report paths that can be used in run()
run (report, options)
Runs a report script, using the current repository. pepper tries to find a report named report (just like you would pass it on the command line) and runs it. If the options parameter is omitted, the options of the calling report are used.
You may want to use Lua's pcall() to wrap calls to this function. If the execution failed, an error will be pushed to the calling report.

Parameters

  • report: Name or path of the report script
  • options: Optional dictionary with command-line options

Return value:

The report output on success, an error message on failure
version ()
Returns the version of the main program as a string

Return value:

A version string

Valid XHTML 1.0!