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.
- Host: GitHub
- URL: https://github.com/cyrilluce/html-to-ansi
- Owner: cyrilluce
- Created: 2024-09-12T06:36:41.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-09-14T02:00:01.000Z (9 months ago)
- Last Synced: 2025-02-26T08:38:53.721Z (3 months ago)
- Language: TypeScript
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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!