Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seppestas/go-ansicon
A Go library that converts ANSI escape sequences to Windows API calls
https://github.com/seppestas/go-ansicon
Last synced: 22 days ago
JSON representation
A Go library that converts ANSI escape sequences to Windows API calls
- Host: GitHub
- URL: https://github.com/seppestas/go-ansicon
- Owner: seppestas
- Created: 2014-11-21T13:20:02.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T18:50:09.000Z (over 9 years ago)
- Last Synced: 2023-07-15T09:41:28.540Z (over 1 year ago)
- Language: Go
- Size: 172 KB
- Stars: 8
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
go-ansicon
==========A Go library that converts ANSI escape sequences to Windows API calls.
Based on [ANSICON](https://github.com/adoxa/ansicon) by Jason Hood, [go-colortext](https://github.com/daviddengcn/go-colortext) by David Deng and [tcsh](http://www.tcsh.org/Welcome)This library follows the definition of the [XTerm control sequences](http://invisible-island.net/xterm/ctlseqs/ctlseqs.html).
Usage
-----This library provides a `Convert` function, that reads data written to an [io Writer](http://golang.org/pkg/io/#Writer), looks for escape sequences and executes the required Windows API calls.
The rest of the data is written using the returned io Writer.It can be used to make portable command line applications that require ANSI escape sequences and need to run on both Posix and Windows systems.
### Examples
- [Simple SSH client](https://github.com/Bitbored/go-ssh-client)
Current status
--------------
Only VT100 Mode control sequences are supported.Currently implemented:
- Selecting graphic rendition
- Display reset and blank filling
- Setting cursor positionThis makes e.g. a SSH session pretty usable.