4 ms·
Well it's ansi text, so why not just copy the text directly to a DIV, convert the ansi to html (or css) and update it via javascript polling ?
by ck2 11y ago
Well it's ansi text, so why not just copy the text directly to a DIV, convert the ansi to html (or css) and update it via javascript polling ?
- trampi 11y agoYou would have to parse the VT-100 escape codes to generate the correct html + css (e.g. colors and cursor relocation escape sequences). It is not that straight forward, but on the other hand there are libraries for that.
- ck2 11y agohttp://www.pixelbeat.org/scripts/ansi2html.sh http://www.pixelbeat.org/scripts/ansi2html.sh
- jhildings 11y agoOr maybe just use WebRTC or WebSockets for push state change ?