Recent site activity

Code‎ > ‎

Console client

Introduction

This is a small guide to configuring and using the example console client, when running with a local instance of the example wave server.

Configuring the client

First, follow the Installation instructions for the server.

The configuration in run-config.sh is used by the client script, so if the server is configured correctly then client should be too.

Starting the client

$ ./run-client-console.sh foo

You should be greeted by a screen with a vertical bar down the middle, and a prompt giving your user's address. The left side is the "inbox panel" and the right side is the "wave panel", but since foo@acmewave.com isn't a participant on any waves (and there is no open wave) both will be blank.

Creating a new wave

Type /new to create a new wave. Internally, this generates a random wave id and adds foo@acmewave.com as a participant to it, but the visible effect is for the new wave to appear in the inbox. Create a few more waves for good measure.

foo@acmewave.com> /new
foo@acmewave.com> /new
foo@acmewave.com> /new
foo@acmewave.com> /new

The waves you're on are numbered 0 through 3 for convenience. The funny characters (e.g. (w+DzL0oLVczzgK)) are the waveId, which is displayed for the purpose of development.

Opening a wave

Before doing anything interesting there needs to be an open wave, so pick one and use /open.

foo@acmewave.com> /open 2

The inbox panel now highlights the open wave, and the wave's content is displayed on the right. So far, the only participant in this wave isfoo@acmewave.com and nothing has been written yet.

Writing something

Simply type text and hit enter. Notice the wave's digest updating in the inbox panel, too.

foo@acmewave.com> hello
foo@acmewave.com> world
foo@acmewave.com> isn't this nice?

There is currently no character-by-character transmission as this would require extra effort to behave nicely with multiple participants (but, feel free to add it!).

Adding participants

Start up another instance of the client in a separate terminal, using bar as the user name. Instead of populating bar's inbox with new waves, add them to the current wave. Note that you can also leave out the @acmewave.com part if acmewave.com is your local domain.

foo@acmewave.com> /add bar@acmewave.com

Removing participants

While a little rude, bar can remove foo from this wave. Note that you can also leave out the @acmewave.com part if acmewave.com is your local domain.

bar@acmewave.com> /remove foo@acmewave.com

Other features

Scrolling

The console client is able to scroll up and down in long waves.

The keys { and } are bound to scrolling up and down respectively, so it isn't actually possible to type them in a conversation (a worthy sacrifice). Pressing enter by itself will return to the most recent line in a wave. There is also the command /scroll to set how many lines are scrolled with each key press, initially 1 when the client starts.

Tab completion

Tab completion for commands is supported. Rather than typing /open 2 you only need to type o, press tab, then type 2.

Unread notification

If the terminal supports bold fonts, the client will mark bold the inbox entries of any waves with unread activity (i.e. if the wave changes while not open).

Of course, there is no persistence with the client, so when first started all waves will be bold. The command /read can be used to set all waves as read.

XML rendering

Intended for debugging, the client can be set to render waves as raw XML with /view xml. Return to normal rendering with /view normal.

Strange Characters

Depending on your platform you might see strange characters ("[0m"). They are vt100 control codes and might not be understood by all platforms (e.g. Windows).

Comments