https://github.com/yut23/dec_ansi_parser
Pure-python terminal control sequence parser, based on Paul Williams' DEC-compatible parser: https://www.vt100.net/emu/dec_ansi_parser
https://github.com/yut23/dec_ansi_parser
escape-sequences python terminal
Last synced: 3 months ago
JSON representation
Pure-python terminal control sequence parser, based on Paul Williams' DEC-compatible parser: https://www.vt100.net/emu/dec_ansi_parser
- Host: GitHub
- URL: https://github.com/yut23/dec_ansi_parser
- Owner: yut23
- License: bsd-3-clause
- Created: 2022-10-13T16:48:57.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-27T21:35:27.000Z (about 2 years ago)
- Last Synced: 2025-03-18T06:17:33.099Z (7 months ago)
- Topics: escape-sequences, python, terminal
- Language: Python
- Homepage:
- Size: 48.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# dec_ansi_parser
Pure-python terminal control sequence parser, based on [Paul Williams' DEC-compatible parser](https://www.vt100.net/emu/dec_ansi_parser).
Changes from Williams' parser:
* Handles subparameters
* Allows UTF-8 encoded strings (treated as normal text)
* Ignores the backslash (0x5C) in a 7-bit string terminator when exiting an OSC or DCS control stringAny invalid UTF-8 sequences are parsed as individual raw bytes.
## Installation
```bash
$ pip install dec_ansi_parser
```## Usage
- TODO
## Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
## License
`dec_ansi_parser` was created by yut23. It is licensed under the terms of the BSD 3-Clause license.
## Credits
`dec_ansi_parser` was created with [`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter).