terminal

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2020 License: MIT Imports: 10 Imported by: 1

Documentation

Overview

Package terminal converts ANSI input to HTML output.

The generated HTML needs to be used with the stylesheet at https://raw.githubusercontent.com/buildkite/terminal-to-html/master/assets/terminal.css and wrapped in a term-container div.

Modified version of https://github.com/buildkite/terminal-to-html

Index

Constants

View Source
const (
	ELEMENT_ITERM_IMAGE = iota
	ELEMENT_IMAGE       = iota
	ELEMENT_LINK        = iota
	ELEMENT_BK          = iota
)
View Source
const (
	MODE_NORMAL  = iota
	MODE_ESCAPE  = iota
	MODE_CONTROL = iota
	MODE_OSC     = iota
	MODE_CHARSET = iota
	MODE_APC     = iota
)
View Source
const (
	COLOR_NORMAL        = iota
	COLOR_GOT_38_NEED_5 = iota
	COLOR_GOT_48_NEED_5 = iota
	COLOR_GOT_38        = iota
	COLOR_GOT_48        = iota
)

Variables

This section is empty.

Functions

func RenderAsANSI

func RenderAsANSI(input []byte) []byte

RenderAsANSI parses ANSI cursor codes, but retains color codes.

func RenderAsHTML

func RenderAsHTML(input []byte) []byte

RenderAsHTML converts ANSI to HTML and returns the result.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL