Prepare 0.5.1
[shpub.git] / src / shpub / Cli.php
index 45071553e4f480ae106d43b43a1346c35044379a..a7e658d1d856ad66e9b95183f17dd4ee9bfe2739 100644 (file)
@@ -24,13 +24,17 @@ class Cli
                     $res->command->args['server'],
                     $res->command->args['user'],
                     $res->command->args['key'],
-                    $res->command->options['force']
+                    $res->command->options['force'],
+                    $res->command->options['scope']
                 );
                 break;
 
             case 'server':
                 $cmd = new Command_Server($this->cfg);
-                $cmd->run($res->command->options['verbose']);
+                $cmd->run(
+                    $res->command->args['server'],
+                    $res->command->options['verbose']
+                );
                 break;
 
             default:
@@ -49,7 +53,7 @@ class Cli
     /**
      * Let the CLI option parser parse the options.
      *
-     * @param object $parser Option parser
+     * @param object $optParser Option parser
      *
      * @return object Parsed command line parameters
      */
@@ -89,8 +93,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.5.1';
         $optParser->subcommand_required = true;
 
         $optParser->addOption(
@@ -117,6 +122,7 @@ class Cli
 
         Command_Connect::opts($optParser);
         Command_Server::opts($optParser);
+        Command_Targets::opts($optParser);
 
         Command_Article::opts($optParser);
         Command_Note::opts($optParser);
@@ -130,6 +136,8 @@ class Cli
         Command_Undelete::opts($optParser);
         Command_Update::opts($optParser);
 
+        Command_Upload::opts($optParser);
+
         return $optParser;
     }