DockerCLI/vendor/github.com/jaguilar/vt100
Sebastiaan van Stijn 3143ba5700
bump LK4D4/vndr v0.0.3 and revendor
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 909b85460c)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2019-09-23 19:30:55 +02:00
..
LICENSE vendor: update buildkit to 62e55427 2019-04-02 23:40:56 -07:00
README.md vendor: update buildkit to 62e55427 2019-04-02 23:40:56 -07:00
command.go vendor: update buildkit to 62e55427 2019-04-02 23:40:56 -07:00
go.mod bump LK4D4/vndr v0.0.3 and revendor 2019-09-23 19:30:55 +02:00
scanner.go vendor: update buildkit to 62e55427 2019-04-02 23:40:56 -07:00
vt100.go vendor: update buildkit to 62e55427 2019-04-02 23:40:56 -07:00

README.md

#VT100

Build Status

GoDoc

This is a vt100 screen reader. It seems to do a pretty decent job of parsing the nethack input stream, which is all I want it for anyway.

Here is a screenshot of the HTML-formatted screen data:

The features we currently support:

  • Cursor movement
  • Erasing
  • Many of the text properties -- underline, inverse, blink, etc.
  • Sixteen colors
  • Cursor saving and unsaving
  • UTF-8

Not currently supported (and no plans to support):

  • Scrolling
  • Prompts
  • Other cooked mode features

The API is not stable! This is a v0 package.

Demo

Try running the demo! Install nethack:

sudo apt-get install nethack

Get this code:

go get github.com/jaguilar/vt100
cd $GOPATH/src/githib.com/jaguilar/vt100

Run this code:

go run demo/demo.go -port=8080 2>/tmp/error.txt

Play some nethack and check out the resulting VT100 terminal status:

# From another terminal . . .
xdg-open http://localhost:8080/debug/vt100

The demo probably assumes Linux (it uses pty-related syscalls). I'll happily accept pull requests that replicate the pty-spawning functions on OSX and Windows.