File: README.md

package info (click to toggle)
golang-github-jaguilar-vt100 0.0~git20201024.81de19c-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 152 kB
  • sloc: makefile: 4
file content (54 lines) | stat: -rw-r--r-- 1,355 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#VT100

[![Build Status](https://travis-ci.org/jaguilar/vt100.svg?branch=master)](https://travis-ci.org/jaguilar/vt100)

[![GoDoc](https://godoc.org/github.com/jaguilar/vt100?status.svg)](https://godoc.org/github.com/jaguilar/vt100)

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:

![](_readme/screencap.png)

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.