Skip to content

The command line interface

mvankeulen edited this page Oct 2, 2013 · 6 revisions

This page explains how to develop and test Tweetboards with the command-line interface (noDUI).

Starting noDUI

The command-line interface noDUI can be started with the following command

python noDUI.py [options] file

This will load the ECA-file file and initializes the rule engine. It should report

Generating LALR tables
WARNING: 32 shift/reduce conflicts
Cache filled. Rule engine started...

The rule engine then waits for the browser to connect.

The fourgadgetdemo.html mentioned below belongs to the ECA-file fourgadgetdemo.ECA. Use these for a first-time check and demo. It is useful to give the same name to the HTML-file as well as the ECA-file as they form a tightly coupled pair.

If you haven’t done so already, start your browser. Go to the URL http://localhost:7737/fourgadgetdemo.html. You should see the contents of fourgadgetdemo.html; out-of-the-box you should see (perhaps only briefly) a page with title "Twitter Dashboard" and header "Demo Twitter Dashboard for M1.1".

After the browser displays the dashboard, the rule engine automatically starts. The rule engine simulates a twitter feed by one-by-one take a tweet, creating the associated new_tweet event, and triggering the associated ECA rules. You should see in your browser the visualization initialized and dynamically changing according to the rules specified in the ECA file. You should see messages "Rule engine working" and "Working…​ NN%".

Working iteratively

Usually you try to execute your set-up in the manner described above, find some error, correct it and would like to try it again. A handy way of re-initializing and restarting is to

  1. If noDUI does not give your prompt back (known to happen sometimes on Mac) or it is still running but you’d like to stop it, simple press CTRL-C.

  2. Click on Refresh in your browser (depending on the browser you use, you should get a 'Page not found' or 'Could not connect' error)

  3. Start noDUI

  4. Click on Refresh in your browser again, which should start the next run of the rule engine.

The connection that is made between the browser and the ECA Rule Engine is known to uncer certain circumstances not always establish successfully. See Known problems for more details.

Options

To see all the possible options, run the command

python noDUI.py -h