[Bps-public-commit] r15185 - in sd/trunk/lib/App/SD/CLI/Command: Help
jesse at bestpractical.com
jesse at bestpractical.com
Fri Aug 15 02:45:47 EDT 2008
Author: jesse
Date: Fri Aug 15 02:45:46 2008
New Revision: 15185
Modified:
sd/trunk/lib/App/SD/CLI/Command/Help.pm
sd/trunk/lib/App/SD/CLI/Command/Help/Sync.pm
Log:
* somehow, the toplevel help file was still spang's accidental revert
Modified: sd/trunk/lib/App/SD/CLI/Command/Help.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Help.pm (original)
+++ sd/trunk/lib/App/SD/CLI/Command/Help.pm Fri Aug 15 02:45:46 2008
@@ -3,34 +3,46 @@
extends 'Prophet::CLI::Command';
with 'App::SD::CLI::Command';
-sub run {
+sub title {
+ my $self = shift;
-print <<EOF
-$0 @{[$App::SD::VERSION]}
+}
+
+sub _get_cmd_name {
+ my $self = shift;
+ return '' if $self->cli->interactive_shell;
+ my $cmd = $0;
+ $cmd =~ s{^(.*)/}{}g;
+ return $cmd;
+}
-$0 ticket create -- summary "This is a summary" status new somekey value
-$0 ticket update --id <id> -- status closed
-$0 ticket resolve --id <id>
-$0 ticket search --regex .
-$0 ticket search -- status!=closed summary =~ http
-$0 ticket delete --id <id>
-$0 ticket show --id <id>
-$0 ticket details --id <id>
-$0 pull --from remote-url
-$0 pull --all
-$0 publish --to remote-url
-
-$0 help
- Show this file
-= ENVIRONMENT
+sub print_header {
+ my $self = shift;
+ my $title = shift;
+ my $string = "sd ".$App::SD::VERSION." - " .$title;
+
+ print "\n".$string . "\n";
+ print '-' x ( length($string));
+ print "\n";
- export SD_REPO=/path/to/sd/replica
- # Specify where the ticket database SD is using should reside
+}
-= EXAMPLES
+sub run {
+ my $self = shift;
+ my $cmd = $self->_get_cmd_name;
+
+ $self->print_header("Help Index");
+
+
+print <<EOF
- sd pull --from rt:http://rt3.fsck.com|QUEUENAME|QUERY
+$cmd help search - Searching for and displaying tickets
+$cmd help tickets - Working with tickets
+$cmd help comments - Working with ticket comments
+$cmd help attachments - Working with ticket attachments
+$cmd help sync - Publishing and importing ticket databases
+$cmd help environment - Environment variables which affect sd
EOF
Modified: sd/trunk/lib/App/SD/CLI/Command/Help/Sync.pm
==============================================================================
--- sd/trunk/lib/App/SD/CLI/Command/Help/Sync.pm (original)
+++ sd/trunk/lib/App/SD/CLI/Command/Help/Sync.pm Fri Aug 15 02:45:46 2008
@@ -29,12 +29,12 @@
Publish a copy of this replica, including a static html representation,
to a remote server using rsync over ssh.
- $comd server --port 9876
+ $cmd server --port 9876
Start an sd replica server on port 9876. This command will make your
replica browsable and pullable by anyone with remote access to your
computer.
- $comd server --writable --port 9876
+ $cmd server --writable --port 9876
Start an sd replica server on port 9876, with UNAUTHENTICATED,
PUBLIC WRITE ACCESS via HTTP POST. This command will make your
replica modifiable, browsable and pullable by ANYONE with remote
More information about the Bps-public-commit
mailing list