protected function loadOptParser()
{
$optParser = new \Console_CommandLine();
- $optParser->description = 'shpub';
- $optParser->version = '0.1.0';
+ $optParser->name = 'shpub';
+ $optParser->description = 'Command line micropub client';
+ $optParser->version = '0.1.0';
$optParser->subcommand_required = true;
$optParser->addOption(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('article');
+ $cmd->description = 'Create an article';
static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('bookmark');
+ $cmd->description = 'Create a bookmark';
static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('connect');
+ $cmd->description = 'Obtain access token from a micropub server';
$cmd->addOption(
'force',
array(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('delete');
+ $cmd->description = 'Delete an existing post';
static::addOptJson($cmd);
$cmd->addArgument(
'url',
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('like');
+ $cmd->description = 'Create a like';
static::optsGeneric($cmd);
$cmd->addArgument(
'url',
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('note');
+ $cmd->description = 'Create a note';
static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('reply');
+ $cmd->description = 'Create a reply';
static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('repost');
+ $cmd->description = 'Create a repost';
static::optsGeneric($cmd);
$cmd->addArgument(
'url',
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('rsvp');
+ $cmd->description = 'Create a reservation';
static::addOptHtml($cmd);
static::optsGeneric($cmd);
$cmd->addArgument(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('server');
+ $cmd->description = 'List all connections';
$cmd->addOption(
'verbose',
array(
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('undelete');
+ $cmd->description = 'Restore a deleted post';
static::addOptJson($cmd);
$cmd->addArgument(
'url',
public static function opts(\Console_CommandLine $optParser)
{
$cmd = $optParser->addCommand('update');
+ $cmd->description = 'Modify an existing post';
$cmd->addOption(
'add',
array(