Exemplo n.º 1
0
$thisProjectDir = dirname(__FILE__);
$timeStamp = date("Ymd_His");
// format to yyyymmdd_hhmmss
$stdin = FALSE;
$prefix = '&';
$addTag = NULL;
$setTag = NULL;
$untag = NULL;
$rate = NULL;
// include files
require_once 'Console/CommandLine.php';
require_once $thisProjectDir . '/lib_general/General.inc.php';
require_once $thisProjectDir . '/lib_openmeta/Openmeta.inc.php';
// create the parser from xml file
$xmlFile = $thisProjectDir . '/opentag.xml';
$parser = Console_CommandLine::fromxmlFile($xmlFile);
try {
    // run the parser
    $result = $parser->parse();
    // command argument
    $files = $result->args['files'];
    if ($files == '$') {
        $stdin = TRUE;
    }
    //<-- end if -->
    // command options
    $debugmode = $result->options['debug'];
    $varmode = $result->options['variables'];
    $verbose = $result->options['verbose'];
    $rating = $result->options['rating'];
    $spotlight = $result->options['spotlight'];