screen-scraper
-============-

This is an extensible telnet/vt100 screen-scraper for lisp. By
rendering unreadable vt100 control sequences into an array of strings
(lines), It allows you to interact with a character-based menu
interface and keep your sanity.

The code should be portable ANSI Common Lisp. If you find any
incompatibilities or bugs, don't hesitate to send bug reports or
patches to <sysadmin@sil.at>.

How to use it
------=------

::Installation & loading:

If you have ASDF (http://cliki.net/asdf), symlink the
"screen-scraper.asd" file to your asdf:*central-registry* location (on
SBCL, that's ~/.sbcl/systems), and on the REPL, do:

 * (asdf:oos 'asdf:load-op :screen-scraper)

If you are using it from your ASDF system, add :screen-scraper to your
system's :depends-on list.

::Using it from a program:

You need an open character stream to read telnet characters from. Any
network stream should do. We'll call it THE-STREAM. (-:

Then, you are ready to render into SCREEN-SCRAPER:*VT100*:

 * (screen-scraper:read-chars THE-STREAM)

This will read characters into *VT100*, until no chars came in for the
last 1 second (unfortunately, vt100-based menus have no way of saying
"I'm expecting input from you", so they just wait /-:).

To see what was read, use:

 * (dump-vt100 screen-scraper:*vt100*)

Of course, you can also match stuff on the screen via cl-ppcre and do
other things with it (like interaction); but that's up to you (-: