General functions for interacting with the main program.
|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|
- current_report ()
Returns the current report context.
Return value:A pepper.report instance
- 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
optionsparameter 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.
- 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