Metadata-Version: 2.4
Name: bittty
Version: 0.0.7
Summary: a pure python tty
Author-email: Gareth Davidson <gaz@bitplane.net>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: pywinpty>=2.0.15; sys_platform == 'win32'
Requires-Dist: pre-commit ; extra == "dev"
Requires-Dist: pytest ; extra == "dev"
Requires-Dist: coverage ; extra == "dev"
Requires-Dist: pytest-cov ; extra == "dev"
Requires-Dist: pytest-asyncio ; extra == "dev"
Requires-Dist: build ; extra == "dev"
Requires-Dist: twine ; extra == "dev"
Requires-Dist: ruff ; extra == "dev"
Requires-Dist: pydoc-markdown ; extra == "dev"
Provides-Extra: dev

# bittty

A pure Python terminal emulator.

Almost usable; some scroll region problems, doesn't like textual in textual yet.

## Demo

Run the standalone demo:

```bash
python ./demo/terminal.py
```

Or use the textual demo to see it in a TUI:

```bash
uvx textual-tty
```

## Links

* [🏠 home](https://bitplane.net/dev/python/bittty)
* [📖 pydoc](https://bitplane.net/dev/python/bittty/pydoc)
* [🐍 pypi](https://pypi.org/project/bittty)
* [🐱 github](https://github.com/bitplane/bittty)

## License

WTFPL with one additional clause

1. Don't blame me

Do wtf you want, but don't blame me when it rips a hole in your trousers.

## Recent changes

* 🐌 use regex for parsing to speed things up a tad (~2x faster)
* 📚 document half a billion DEC private modes we don't support
* 🔙 DECLM - allow `\n` to act like `\r\n` so we don't have to rely on cooked
  input on the pty when using as a library.
* 🖼️ DEC Special Graphics
* 🐌 Faster colour/style parser
* ⛓️‍💥 Split out from `textual-tty` into separate package

## bugs / todo

- [ ] [architecture](architecture) - pretty big
- [ ] gui
  - [ ] make a terminal input class, for standalone input
  - [ ] make `framebuffer.py`
  - [ ] choose a display driver
- [ ] performance improvements
  - [x] parse with regex over large buffer sizes
    - [ ] reconsider CSI end char approach
  - [ ] line cache for outputs
  - [ ] revisit colours
- [ ] scrollback buffer
  - [ ] implement `logloglog` for scrollback with wrapping
- [ ] bugs
  - [ ] corruption in stream - debug it
  - [ ] scroll region: scroll up in `vim` corrupts outside scroll region
- [ ] add terminal overlay visuals
  - [ ] bell flash effect
  - [ ] make cursor an overlay
  - [ ] make mouse an overlay
  - [ ] debug overlay for scroll regions
- [ ] Support themes
- [ ] bittty-specific escape sequences
  - [ ] visible mouse on / off
  - [ ] debugging info
  - [ ] record
  - [ ] list sequences + values
- [ ] Document all the escape sequences
  - [ ] build a terminal library

