← Back to team overview

mahara-contributors team mailing list archive

[Bug 844607] A change has been merged

 

Reviewed:  https://reviews.mahara.org/687
Committed: http://gitorious.org/mahara/mahara/commit/36f8803311a0c842d4cc8084c9567e12b4adadc0
Submitter: Francois Marier (francois@xxxxxxxxxxxxxxx)
Branch:    master

commit 36f8803311a0c842d4cc8084c9567e12b4adadc0
Author: Andrew Robert Nicols <andrew.nicols@xxxxxxxxxxx>
Date:   Tue Sep 13 08:58:12 2011 +0100

    Add CLI Library (Bug #844607)
    
    This commit adds a Command Line Interface to make writing CLI scripts
    easier. It can be called in a basic fashion, or an extended fashion which
    automatically generates help and applies verbosity, help, and argument
    validation.
    
    Change-Id: I9f13de74ba29e072e64e859f065bb6d754d6393b
    Signed-off-by: Andrew Robert Nicols <andrew.nicols@xxxxxxxxxxx>

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
https://bugs.launchpad.net/bugs/844607

Title:
  Create CLI Framework/Libraries

Status in Mahara ePortfolio:
  In Progress

Bug description:
  I've been having a look at bug #844604. Rather than re-inventing the wheel every time we want to do a CLI system, I propose that we create a CLI library
  lib/cli.php

  This should ideally give functionality for:
  * retrieve arguments supplied on the CLI (e.g. --agree-to-license=yes --upgrade-only -p=letmein -e=foo@xxxxxxxxxxx)
  * add a log_exit or equivelant which would exit with the appropriate exit code (0 = success, 127 = error, other supplied ints in range) and exit - e.g. cli_exit().

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/844607/+subscriptions


References