Metadata-Version: 2.1
Name: ansiparser
Version: 1.0.0
Summary: A convenient library for converting ANSI escape sequences into text or HTML.
Home-page: https://github.com/bubble-tea-project/ansiparser
License: Apache-2.0
Author: vHrqO
Author-email: you@example.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: beautifulsoup4 (>=4.12.3,<5.0.0)
Project-URL: Repository, https://github.com/bubble-tea-project/ansiparser
Description-Content-Type: text/markdown

<h1 align="center">AnsiParser</h1>

<div align="center">

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


![GitHub last commit](https://img.shields.io/github/last-commit/bubble-tea-project/ansiparser) 
![PyPI - Version](https://img.shields.io/pypi/v/ansiparser)
![GitHub License](https://img.shields.io/github/license/bubble-tea-project/ansiparser)

</div>

## 📖 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.

Pypi: https://pypi.org/project/ansiparser/

## ✨ Supported Features
- CSI (Control Sequence Introducer) sequences
    - SGR (Select Graphic Rendition) 
    - CUP (Cursor Position)
    - ED (Erase in Display)
    - EL (Erase in Line)
- Convert
    - formatted text 
    - HTML

## 🎨 Usage
```python
import ansiparser

ansip_screen = ansiparser.new_screen()
ansip_screen.put("\x1b[1;6H-World!\x1b[1;1HHello")

ansip_screen.parse()
converted = ansip_screen.to_formatted_string()

print(converted) # ['Hello-World!']
```


## 📜 License
![GitHub License](https://img.shields.io/github/license/bubble-tea-project/ansiparser)








