Skip to content

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

Notifications You must be signed in to change notification settings

cyrilluce/html-to-ansi

Repository files navigation

html2ansi

Convert HTML to ANSI colored text.

Online playground: https://cyrilluce.github.io/html-to-ansi/

Usage

cli

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

NodeJs

npm i html2ansi -S
import { html2ansi } from 'html2ansi';

const ansi = html2ansi(html);

TODOs

  • support <pre>
  • support colors supported in browser but not available with chalk.xxx

PR is welcome!

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published