rburns / ansi-to-html

Convert ansi escaped text streams to html.
MIT License
357 stars 48 forks source link

[Question] HTML to Text output #96

Closed 1000p closed 3 years ago

1000p commented 3 years ago

Does the module support a method to convert the generated HTML to a text file (without the HTML tags)?

rburns commented 3 years ago

There is a CLI included. Example usage here https://github.com/rburns/ansi-to-html#command-line-usage. In order to save it's output to a file you could do something like the following.

git log | ansi-to-html > git-log.html
1000p commented 3 years ago

There is a CLI included. Example usage here https://github.com/rburns/ansi-to-html#command-line-usage. In order to save it's output to a file you could do something like the following.

git log | ansi-to-html > git-log.html

Sorry not correct wording in the initial question, I have edited. Thanks for the prompt answer. This does outputs to a file (in the case HTML), but what I am after is to convert the generated HTML to a text, without the HTML tags.

rburns commented 3 years ago

No, this software doesn't do that