break;
}
} catch (\Exception $e) {
- echo 'Error: ' . $e->getMessage() . "\n";
+ Log::err('Error: ' . $e->getMessage());
exit(1);
}
}
$this->cfg->host = $this->cfg->hosts[$key];
}
}
- if ($opts['user'] !== null) {
- $this->cfg->host->user = $opts['user'];
- }
$this->cfg->setDebug($opts['debug']);
return $res;
{
$optParser = new \Console_CommandLine();
$optParser->description = 'shpub';
- $optParser->version = '0.0.2';
+ $optParser->version = '0.0.4';
$optParser->subcommand_required = true;
$optParser->addOption(
'default' => null,
)
);
- $optParser->addOption(
- 'user',
- array(
- 'short_name' => '-u',
- 'long_name' => '--user',
- 'description' => 'User URL',
- 'help_name' => 'URL',
- 'action' => 'StoreString',
- 'default' => null,
- )
- );
$optParser->addOption(
'debug',
array(
)
);
+ Command_Article::opts($optParser);
Command_Note::opts($optParser);
Command_Reply::opts($optParser);
Command_Like::opts($optParser);
+ Command_Repost::opts($optParser);
return $optParser;
}