X-Git-Url: https://git.cweiske.de/shpub.git/blobdiff_plain/f46e4d3108d944bcf86f5905780f1fcfd441c036..d5dbb7068eeeee3ae5e92cee77763c1e70e28c97:/src/shpub/Command/Note.php diff --git a/src/shpub/Command/Note.php b/src/shpub/Command/Note.php index 2e07e9d..1694243 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'); + static::addOptHtml($cmd); static::optsGeneric($cmd); $cmd->addArgument( 'text', @@ -20,8 +21,8 @@ class Command_Note extends Command_AbstractProps public function run(\Console_CommandLine_Result $cmdRes) { $req = new Request($this->cfg->host, $this->cfg); - $req->req->addPostParameter('h', 'entry'); - $req->req->addPostParameter('content', $cmdRes->args['text']); + $req->setType('entry'); + $req->addContent($cmdRes->args['text'], $cmdRes->options['html']); $this->handleGenericOptions($cmdRes, $req); $res = $req->send();