From: Christian Weiske Date: Mon, 12 Sep 2016 04:31:06 +0000 (+0200) Subject: add "category" option to notes X-Git-Tag: v0.0.5~9 X-Git-Url: https://git.cweiske.de/shpub.git/commitdiff_plain/7c9925e3a96644795d275a326e23937a307ce109 add "category" option to notes --- diff --git a/src/shpub/Command/Note.php b/src/shpub/Command/Note.php index b5df8ba..aceffcf 100644 --- a/src/shpub/Command/Note.php +++ b/src/shpub/Command/Note.php @@ -16,6 +16,17 @@ class Command_Note public static function opts(\Console_CommandLine $optParser) { $cmd = $optParser->addCommand('note'); + $cmd->addOption( + 'categories', + array( + 'short_name' => '-c', + 'long_name' => '--category', + 'description' => 'Categories', + 'help_name' => 'CAT', + 'action' => 'StoreArray', + 'default' => [], + ) + ); $cmd->addOption( 'files', array( @@ -57,6 +68,11 @@ class Command_Note 'published', $command->options['published'] ); } + if (count($command->options['categories'])) { + $req->req->addPostParameter( + 'category', $command->options['categories'] + ); + } $files = $command->options['files']; $fileList = $urlList = [