Project

ansi2txt

0.0
The project is in a healthy, maintained state
ansi2txt converts ANSI escape sequences to readable plain text.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

ansi2txt

ansi2txt converts ANSI escape sequences to readable plain text.

This library is a Ruby port based on colorized-logs.

Installation

gem install ansi2txt

Usage

An example of converting input from an IO object to plain text.

input = File.open("typescript")
puts Ansi2txt::ANSI2TXT.from_io(input)

An example of converting input from standard input to plain text.

cat typescript | ansi2txt

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/Himeyama/ansi2txt.

License

The gem is available as open source under the terms of the MIT License.