public class Shell
extends java.lang.Object
This is an example program included with the RiveScript Java library. It serves as a way to quickly demo and test a RiveScript bot.
Usage:
java com.rivescript.cmd.Shell [options] </path/to/documents>
Options:
--nostrict
Disable strict syntax checking
--utf8
Enable UTF-8 mode
--forcecase
Enable forcing triggers to lowercase
--concat=none|newline|space
Set the global concat mode (default none
)
--depth=50
Override the recursion depth limit (default 50
)
--nocolor
Disable ANSI colors
Modifier and Type | Class and Description |
---|---|
protected static class |
Shell.Color
The color names.
|
Constructor and Description |
---|
Shell() |
Modifier and Type | Method and Description |
---|---|
protected void |
init(RiveScript rs)
Initializes the RiveScript instance.
|
static void |
main(java.lang.String[] args) |
protected void |
print(Shell.Color color,
java.lang.String... text)
Prints colored text.
|
protected void |
run(RiveScript rs)
Runs the RiveScript bot.
|
protected void |
run(java.lang.String[] args)
Runs the RiveScript bot.
|
protected void init(RiveScript rs)
Override this method to define additional language handlers or Java object macro's.
rs
- the RiveScript instanceprotected void run(java.lang.String[] args)
args
- the argumentsprotected void run(RiveScript rs)
rs
- the initialised RiveScript instanceprotected void print(Shell.Color color, java.lang.String... text)
color
- the colortext
- the textpublic static void main(java.lang.String[] args)