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 5689851..e071252 100644 (file)
@@ -89,8 +89,9 @@ class Cli
     protected function loadOptParser()
     {
         $optParser = new \Console_CommandLine();
     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(
         $optParser->subcommand_required = true;
 
         $optParser->addOption(
index c657b2c..018b403 100644 (file)
@@ -6,6 +6,7 @@ class Command_Article extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('article');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('article');
+        $cmd->description = 'Create an article';
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
index 0116cb5..4d30cec 100644 (file)
@@ -6,6 +6,7 @@ class Command_Bookmark extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('bookmark');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('bookmark');
+        $cmd->description = 'Create a bookmark';
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
index 2b1cfc1..6634267 100644 (file)
@@ -17,6 +17,7 @@ class Command_Connect
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('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(
         $cmd->addOption(
             'force',
             array(
index 7735e21..cd97500 100644 (file)
@@ -6,6 +6,7 @@ class Command_Delete extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('delete');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('delete');
+        $cmd->description = 'Delete an existing post';
         static::addOptJson($cmd);
         $cmd->addArgument(
             'url',
         static::addOptJson($cmd);
         $cmd->addArgument(
             'url',
index ad19b8f..a619f7a 100644 (file)
@@ -6,6 +6,7 @@ class Command_Like extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('like');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('like');
+        $cmd->description = 'Create a like';
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
index 1694243..2a911c9 100644 (file)
@@ -6,6 +6,7 @@ class Command_Note extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('note');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('note');
+        $cmd->description = 'Create a note';
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
index aa193e0..61e4c59 100644 (file)
@@ -6,6 +6,7 @@ class Command_Reply extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('reply');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('reply');
+        $cmd->description = 'Create a reply';
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
index 6d78609..4154b2d 100644 (file)
@@ -6,6 +6,7 @@ class Command_Repost extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('repost');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('repost');
+        $cmd->description = 'Create a repost';
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
         static::optsGeneric($cmd);
         $cmd->addArgument(
             'url',
index 4e67e9b..f46d230 100644 (file)
@@ -9,6 +9,7 @@ class Command_Rsvp extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('rsvp');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('rsvp');
+        $cmd->description = 'Create a reservation';
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
         static::addOptHtml($cmd);
         static::optsGeneric($cmd);
         $cmd->addArgument(
index a3c52ee..34d939e 100644 (file)
@@ -11,6 +11,7 @@ class Command_Server
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('server');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('server');
+        $cmd->description = 'List all connections';
         $cmd->addOption(
             'verbose',
             array(
         $cmd->addOption(
             'verbose',
             array(
index 55dd6b9..63d604b 100644 (file)
@@ -6,6 +6,7 @@ class Command_Undelete extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('undelete');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('undelete');
+        $cmd->description = 'Restore a deleted post';
         static::addOptJson($cmd);
         $cmd->addArgument(
             'url',
         static::addOptJson($cmd);
         $cmd->addArgument(
             'url',
index d942f5e..119ef8f 100644 (file)
@@ -6,6 +6,7 @@ class Command_Update extends Command_AbstractProps
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('update');
     public static function opts(\Console_CommandLine $optParser)
     {
         $cmd = $optParser->addCommand('update');
+        $cmd->description = 'Modify an existing post';
         $cmd->addOption(
             'add',
             array(
         $cmd->addOption(
             'add',
             array(