add description for all commands
[shpub.git] / src / shpub / Command / Note.php
index c7683f3b7a289f5052e571b2e3754b0ba6e77db7..2a911c905560c9496abf3ca3ccb053270900ea17 100644 (file)
@@ -6,6 +6,8 @@ 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(
             'text',
@@ -21,7 +23,7 @@ class Command_Note extends Command_AbstractProps
     {
         $req = new Request($this->cfg->host, $this->cfg);
         $req->setType('entry');
-        $req->addProperty('content', $cmdRes->args['text']);
+        $req->addContent($cmdRes->args['text'], $cmdRes->options['html']);
         $this->handleGenericOptions($cmdRes, $req);
 
         $res = $req->send();