Skip to content

Commit

Permalink
Added usage help details to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jruaux committed Jul 7, 2021
1 parent a1459e2 commit 21d3fe7
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class RiotApp extends HelpCommand {
private boolean info;
@Option(names = {"-d", "--debug"}, description = "Log in debug mode (includes normal stacktrace).")
private boolean debug;
@Option(names = "--stacktrace", description = "Print out the stacktrace for all exceptions..")
@Option(names = "--stacktrace", description = "Print out the stacktrace for all exceptions.")
private boolean stacktrace;

private int executionStrategy(ParseResult parseResult) {
Expand Down
13 changes: 0 additions & 13 deletions docs/guide/guide.gradle
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
configurations {
asciidoctorExtensions
}

dependencies {
asciidoctorExtensions 'com.bmuschko:asciidoctorj-tabbed-code-extension:0.3'
}

guide {
groovydocApiDir = 'api'
}

asciidoctor {
configurations 'asciidoctorExtensions'
attributes = [
'source-highlighter': 'prettify'
]
Expand Down
44 changes: 31 additions & 13 deletions docs/guide/src/docs/asciidoc/getting-started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,42 @@ cd riot/bin

== Usage

To display usage help run the following command:
To display usage help, run the following command:

[subs="attributes,+quotes"]
[subs="specialcharacters,attributes,+quotes",source,bash]
....
[green]#{connector}# --help
Usage: **{connector}** [OPTIONS] [COMMAND]
[olive]#-H#, [olive]#--help# Show this help message and exit
[olive]#-V#, [olive]#--version# Print version information and exit.
[olive]#-q#, [olive]#--quiet# Log errors only.
[olive]#-w#, [olive]#--warn# Set log level to warn.
[olive]#-i#, [olive]#--info# Set log level to info.
[olive]#-d#, [olive]#--debug# Log in debug mode (includes normal stacktrace).
[olive]#--stacktrace# Print out the stacktrace for all exceptions.
Redis connection options
[olive]#-h#, [olive]#--hostname#=<host> Server hostname (default: localhost).
[olive]#-p#, [olive]#--port#=<port> Server port (default: 6379).
[olive]#-s#, [olive]#--socket#=<socket> Server socket (overrides hostname and port).
[olive]#--user#=<name> Used to send ACL style 'AUTH username pass'. Needs password.
[olive]#-a#, [olive]#--pass#[=<password>] Password to use when connecting to the server.
[olive]#-u#, [olive]#--uri#=<uri>... Server URI.
--timeout=<sec> Redis command timeout (default: 60).
[olive]#-n#, [olive]#--db#=<db> Database number (default: 0).
[olive]#-c#, [olive]#--cluster# Enable cluster mode.
[olive]#--tls# Establish a secure TLS connection.
[olive]#--[no-]verify-peer# Verify peers when using TLS. True by default.
[olive]#--latency# Show latency metrics.
[olive]#--pool-max#=<int> Max pool connections (default: 8).
[olive]#--client#=<name> Client name used to connect to Redis.
Commands:
...
....

Redis connection options are the same as `redis-cli`.

For Redis URI syntax see https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details#uri-syntax[here].

[TIP,subs="attributes"]
====
You can use `--help` on any subcommand:
Expand All @@ -53,14 +82,3 @@ You can use `--help` on any subcommand:
[green]#{connector}# import hset --help
....
====

.Redis connection options
[subs="attributes,+quotes"]
....
[green]#{connector}# -h myredis.com -p 6380 ...
....

[TIP,subs="attributes"]
====
Redis connection options are the same as `redis-cli`. URI syntax is described https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details#uri-syntax[here].
====
14 changes: 8 additions & 6 deletions docs/guide/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
:toclevels: 3
:docinfo1:

include::{includedir}/introduction.adoc[leveloffset=+1]
include::{includedir}/riot-db.adoc[leveloffset=+1]
include::{includedir}/riot-file.adoc[leveloffset=+1]
include::{includedir}/riot-gen.adoc[leveloffset=+1]
include::{includedir}/riot-redis.adoc[leveloffset=+1]
include::{includedir}/riot-stream.adoc[leveloffset=+1]
:leveloffset: 1
include::{includedir}/introduction.adoc[]

include::{includedir}/riot-db.adoc[]
include::{includedir}/riot-file.adoc[]
include::{includedir}/riot-gen.adoc[]
include::{includedir}/riot-redis.adoc[]
include::{includedir}/riot-stream.adoc[]

0 comments on commit 21d3fe7

Please sign in to comment.