From: Christian Weiske Date: Tue, 20 Sep 2016 08:45:34 +0000 (+0200) Subject: add description for all commands X-Git-Tag: v0.2.0~2 X-Git-Url: https://git.cweiske.de/shpub.git/commitdiff_plain/6c791f2d0c159d56c570802c8d9bd3612262aa9e add description for all commands --- diff --git a/src/shpub/Cli.php b/src/shpub/Cli.php index 5689851..e071252 100644 --- a/src/shpub/Cli.php +++ b/src/shpub/Cli.php @@ -89,8 +89,9 @@ class Cli 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( diff --git a/src/shpub/Command/Article.php b/src/shpub/Command/Article.php index c657b2c..018b403 100644 --- a/src/shpub/Command/Article.php +++ b/src/shpub/Command/Article.php @@ -6,6 +6,7 @@ class Command_Article extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('article'); + $cmd->description = 'Create an article'; static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( diff --git a/src/shpub/Command/Bookmark.php b/src/shpub/Command/Bookmark.php index 0116cb5..4d30cec 100644 --- a/src/shpub/Command/Bookmark.php +++ b/src/shpub/Command/Bookmark.php @@ -6,6 +6,7 @@ class Command_Bookmark extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('bookmark'); + $cmd->description = 'Create a bookmark'; static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( diff --git a/src/shpub/Command/Connect.php b/src/shpub/Command/Connect.php index 2b1cfc1..6634267 100644 --- a/src/shpub/Command/Connect.php +++ b/src/shpub/Command/Connect.php @@ -17,6 +17,7 @@ class Command_Connect public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('connect'); + $cmd->description = 'Obtain access token from a micropub server'; $cmd->addOption( 'force', array( diff --git a/src/shpub/Command/Delete.php b/src/shpub/Command/Delete.php index 7735e21..cd97500 100644 --- a/src/shpub/Command/Delete.php +++ b/src/shpub/Command/Delete.php @@ -6,6 +6,7 @@ class Command_Delete extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('delete'); + $cmd->description = 'Delete an existing post'; static::addOptJson($cmd); $cmd->addArgument( 'url', diff --git a/src/shpub/Command/Like.php b/src/shpub/Command/Like.php index ad19b8f..a619f7a 100644 --- a/src/shpub/Command/Like.php +++ b/src/shpub/Command/Like.php @@ -6,6 +6,7 @@ class Command_Like extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('like'); + $cmd->description = 'Create a like'; static::optsGeneric($cmd); $cmd->addArgument( 'url', diff --git a/src/shpub/Command/Note.php b/src/shpub/Command/Note.php index 1694243..2a911c9 100644 --- a/src/shpub/Command/Note.php +++ b/src/shpub/Command/Note.php @@ -6,6 +6,7 @@ class Command_Note extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('note'); + $cmd->description = 'Create a note'; static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( diff --git a/src/shpub/Command/Reply.php b/src/shpub/Command/Reply.php index aa193e0..61e4c59 100644 --- a/src/shpub/Command/Reply.php +++ b/src/shpub/Command/Reply.php @@ -6,6 +6,7 @@ class Command_Reply extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('reply'); + $cmd->description = 'Create a reply'; static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( diff --git a/src/shpub/Command/Repost.php b/src/shpub/Command/Repost.php index 6d78609..4154b2d 100644 --- a/src/shpub/Command/Repost.php +++ b/src/shpub/Command/Repost.php @@ -6,6 +6,7 @@ class Command_Repost extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('repost'); + $cmd->description = 'Create a repost'; static::optsGeneric($cmd); $cmd->addArgument( 'url', diff --git a/src/shpub/Command/Rsvp.php b/src/shpub/Command/Rsvp.php index 4e67e9b..f46d230 100644 --- a/src/shpub/Command/Rsvp.php +++ b/src/shpub/Command/Rsvp.php @@ -9,6 +9,7 @@ class Command_Rsvp extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('rsvp'); + $cmd->description = 'Create a reservation'; static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( diff --git a/src/shpub/Command/Server.php b/src/shpub/Command/Server.php index a3c52ee..34d939e 100644 --- a/src/shpub/Command/Server.php +++ b/src/shpub/Command/Server.php @@ -11,6 +11,7 @@ class Command_Server public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('server'); + $cmd->description = 'List all connections'; $cmd->addOption( 'verbose', array( diff --git a/src/shpub/Command/Undelete.php b/src/shpub/Command/Undelete.php index 55dd6b9..63d604b 100644 --- a/src/shpub/Command/Undelete.php +++ b/src/shpub/Command/Undelete.php @@ -6,6 +6,7 @@ class Command_Undelete extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('undelete'); + $cmd->description = 'Restore a deleted post'; static::addOptJson($cmd); $cmd->addArgument( 'url', diff --git a/src/shpub/Command/Update.php b/src/shpub/Command/Update.php index d942f5e..119ef8f 100644 --- a/src/shpub/Command/Update.php +++ b/src/shpub/Command/Update.php @@ -6,6 +6,7 @@ class Command_Update extends Command_AbstractProps public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('update'); + $cmd->description = 'Modify an existing post'; $cmd->addOption( 'add', array(