An open API service indexing awesome lists of open source software.

https://github.com/cyrilluce/html-to-ansi

Convert HTML span base text to chalked (ANSI) text.
https://github.com/cyrilluce/html-to-ansi

Last synced: 3 months ago
JSON representation

Convert HTML span base text to chalked (ANSI) text.

Awesome Lists containing this project

README

        

# html2ansi

Convert HTML to ANSI colored text.

Online playground:

## Usage

### cli

```sh
# convert input.html to output.txt
npx html2ansi -f input.html -o output.txt
# streaming
npx html2ansi -f input.html
```

### NodeJs

```sh
npm i html2ansi -S
```

```ts
import { html2ansi } from 'html2ansi';

const ansi = html2ansi(html);
```

## TODOs

- [ ] support `

`

- [ ] support colors supported in browser but not available with `chalk.xxx`

> PR is welcome!