Developer Area/CLI Framework
From Mahara Wiki
< Developer AreaRevision as of 06:56, 16 September 2011 by Andrewnicols (Beginnings of CLI framework usage and description)
To facilitate creation of Command Line Interface (CLI) scripts, a CLI framework has been created for Mahara.
This is a work in progress
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:
- 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.
Basic usage is currently documented in htdocs/lib/cli.php