The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

rsdemo - Command-line demonstration and development tool for RiveScript.

SYNOPSIS

  Usage: rsdemo
         rsdemo --debug
         rsdemo /path/to/replies
         rsdemo --debug /path/to/replies

DESCRIPTION

rsdemo is a program for testing and developing RiveScript code via the command line. Run with no arguments, rsdemo loads the default set of RiveScript replies that are installed in your Perl lib. The default set is based on the classic Eliza bot's personality, with additional triggers for learning and repeating user information.

If you have a different directory containing RiveScript documents, pass the path to that directory on the command line, and rsdemo will load replies from there instead.

OPTIONS

--debug

This will enable RiveScript debug mode. A lot of information is printed to the terminal when debug mode is active.

--debugfile=?, --file=?, -f=?

Specify an external file for debug lines to be printed to. Since a lot of debug information gets printed, you might want to use this in conjunction with --verbose=0.

--verbose=?, -v=?

Enable or disable verbose (debug) mode. This option only has an effect if debug mode is on. If verbose is 1 (the default), all debug information is printed to the terminal. Set verbose to 0 and this information will NOT go to the terminal.

If debugfile is provided, all debug information will (also) be printed to the debug file.

--help

Prints the usage of the command.

DEBUGGING

The rsdemo tool can be used for debugging a custom set of RiveScript replies. If you pass the --debug option, debug mode is activated. By default, all debug information will be printed to the terminal, which is likely going to be more lines than your scrollback buffer can display. Unless you have a very small amount of replies you're debugging, it'll be more practical to pipe the debug information into a file and not display it on the terminal.

Here's an example:

  rsdemo --debug --verbose=0 --file=debug.txt /path/to/replies

Or a shortened example:

  rsdemo --debug -v=0 -f=debug.txt /path/to/replies

In this case, the terminal would act as normal and allow you to chat with the bot, and all debug information would be written to debug.txt.