Actions

Developer Area/CLI Framework

From Mahara Wiki

< Developer Area
Revision as of 05:56, 16 September 2011 by Andrewnicols (talk | contribs) (Beginnings of CLI framework usage and description)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

To facilitate creation of Command Line Interface (CLI) scripts, a CLI framework has been created for Mahara.

This is a work in progress

Features

The CLI framework has been designed to make creating CLI scripts easier. To this end, it has a number of features:

  • help/usage creation supporting:
    • descriptions;
    • default values;
    • example values; and
    • word wrapping of text.
  • option validation;
  • log level control (ability to turn on verbosity); and an
  • option getter supporting:
    • long and short option names.

Usage

Basic usage is currently documented in htdocs/lib/cli.php