ansiparser 1.0.2 copy "ansiparser: ^1.0.2" to clipboard
ansiparser: ^1.0.2 copied to clipboard

A convenient library for converting ANSI escape sequences into text or HTML.

AnsiParser-dart

The AnsiParser library implemented in Dart.

Pub Version GitHub License

📖 Description #

Parse ANSI escape sequences into screen outputs. This library implements a parser that processes escape sequences like a terminal, allowing you to convert them into formatted text or HTML.

📦 Installation #

AnsiParser is available on Pub:

pub add ansiparser

🎨 Usage #

import 'package:ansiparser/ansiparser.dart' as ansiparser;

void main() {
  final ansipScreen = ansiparser.newScreen();
  ansipScreen.put('\x1b[1;6H-World!\x1b[1;1HHello');

  ansipScreen.parse();
  final converted = ansipScreen.toFormattedString();

  print(converted); // ['Hello-World!']
}

📜 License #

GitHub License

0
likes
160
points
109
downloads

Publisher

unverified uploader

Weekly Downloads

A convenient library for converting ANSI escape sequences into text or HTML.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

collection, east_asian_width, html

More

Packages that depend on ansiparser