# tty2html

> convert console colors output to html tags

Latest version **1.0.0** (published 2017-05-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install tty2html
pnpm add tty2html
yarn add tty2html
bun add tty2html
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-05-27 |
| First published | 2017-05-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | akaJes |
| Maintainers | akajes |
| Keywords | ANSI, CSI, console, color, html, xterm, vt100, diff, grep |

## Links

- npm: https://www.npmjs.com/package/tty2html
- Repository: https://github.com/akaJes/tty2html
- Homepage: https://github.com/akaJes/tty2html#readme
- Issues: https://github.com/akaJes/tty2html/issues
- npm.io page: https://npm.io/package/tty2html

## Dependencies (2)

- [through](https://npm.io/package/through.md) ^2.3.8
- [ansi-style-parser](https://npm.io/package/ansi-style-parser.md) ^1.1.0

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2017-05-27

## README

# tty2http
This is a stream middleware for visualization results from **color** console output to **HTML**
# Installation
`npm --save i tty2http`
# Example
run from root of module `npm i && npm test`

convert colorized console output of commend `diff  tty2html.js test.js --color=always ` to html

with ability for stream support and show this result online
```javascript
var fs=require('fs');
var spawn = require('child_process').spawn;
var tty2html=require('tty2html');

var output=fs.createWriteStream('stream.html') // or it is can be Express.js Response stream
output.write('<pre>'); //for a \t indentation support

var t2h=tty2html(/* tagName or 'span' as default */);
t2h.pipe(output);

var child = spawn('diff',['tty2html.js','test.js','--color=always'] );
child.stdout.pipe(t2h);
child.stderr.pipe(t2h);
```

---
_Source: https://npm.io/package/tty2html · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
