git.cweiske.de
/
shpub.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add "category" option to notes
[shpub.git]
/
src
/
shpub
/
Command
/
Note.php
diff --git
a/src/shpub/Command/Note.php
b/src/shpub/Command/Note.php
index b5df8ba6fe001a1f17353b2d1df672b82c135a12..aceffcfb1e6ffc34cc46c6a74879d8f96db3230d 100644
(file)
--- 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');
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(
$cmd->addOption(
'files',
array(
@@
-57,6
+68,11
@@
class Command_Note
'published', $command->options['published']
);
}
'published', $command->options['published']
);
}
+ if (count($command->options['categories'])) {
+ $req->req->addPostParameter(
+ 'category', $command->options['categories']
+ );
+ }
$files = $command->options['files'];
$fileList = $urlList = [
$files = $command->options['files'];
$fileList = $urlList = [