add description for all commands
authorChristian Weiske <cweiske@cweiske.de>
Tue, 20 Sep 2016 08:45:34 +0000 (10:45 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Tue, 20 Sep 2016 08:49:44 +0000 (10:49 +0200)
13 files changed:
src/shpub/Cli.php
src/shpub/Command/Article.php
src/shpub/Command/Bookmark.php
src/shpub/Command/Connect.php
src/shpub/Command/Delete.php
src/shpub/Command/Like.php
src/shpub/Command/Note.php
src/shpub/Command/Reply.php
src/shpub/Command/Repost.php
src/shpub/Command/Rsvp.php
src/shpub/Command/Server.php
src/shpub/Command/Undelete.php
src/shpub/Command/Update.php

index 56898511e8ac8405013a6abbad53e77f82acffd9..e071252eb6020b75d70034727d3804fd3cbad5f1 100644 (file)
@@ -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(
index c657b2c74c3279d66b749b3c0a3621f97e3145a8..018b4034f75d9dfa25205c767edd251a884912b1 100644 (file)
@@ -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(
index 0116cb51068c752c5e926140410ddc34e890d190..4d30cecd5c707b359d162c6e7e7f38f581806b97 100644 (file)
@@ -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(
index 2b1cfc15efe4d3069bd5feb5492c816fce04a3bc..66342670235bb155ba459c1746b641ed2f74f58a 100644 (file)
@@ -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(
index 7735e218814740d9787642113e112a4a4d4c0bcc..cd975000e65585694bb1537c876b1c5fdbced94c 100644 (file)
@@ -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',
index ad19b8f529838a4014f50bc70420bff4eb1932b1..a619f7ae08bd6e4acf1677df3f225b2a19bd06b5 100644 (file)
@@ -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',
index 1694243ef9cb3fa534900bffadb4b713d20c77c6..2a911c905560c9496abf3ca3ccb053270900ea17 100644 (file)
@@ -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(
index aa193e037c864de544e866097e2b6a4993e06194..61e4c59e986ea6e6b72a45197ebc8160f92c5fa6 100644 (file)
@@ -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(
index 6d786096b7ae419f75808d4d5e9f1e24e0fc790f..4154b2d22992c5f78bfea4d7cc5ec03f04e93885 100644 (file)
@@ -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',
index 4e67e9b1dbc3f8858adea5f1e7426f23ab78ed57..f46d230c3e52132404438a123dba79ce4ee3a059 100644 (file)
@@ -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(
index a3c52eed2bf34cdd6841d22806c44144510cb6f7..34d939e5ca15d27877bb84dc20f807a4d2cfb501 100644 (file)
@@ -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(
index 55dd6b99ccf51c36f9b87433d36c904da0d51493..63d604b6c22515162ea902986c7751860fc1e52f 100644 (file)
@@ -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',
index d942f5e183c238221aeaede77575a1dfa9bcbd17..119ef8ff20740123d908fb0b9677acb5402761b9 100644 (file)
@@ -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(