Metadata-Version: 2.5
Name: bbs-ansi-art
Version: 0.1.0
Summary: Python library for ANSI art - create, view, convert, and repair BBS-era artwork
Project-URL: Homepage, https://github.com/bkrabach/bbs-ansi-art
Project-URL: Documentation, https://github.com/bkrabach/bbs-ansi-art#readme
Project-URL: Repository, https://github.com/bkrabach/bbs-ansi-art.git
Project-URL: Issues, https://github.com/bkrabach/bbs-ansi-art/issues
Author-email: Brian Krabach <brian@krabach.com>
License-Expression: MIT
License-File: LICENSE
Keywords: ansi,art,ascii,bbs,cp437,retro,sauce,terminal,textmode
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Artistic Software
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Terminals
Classifier: Typing :: Typed
Requires-Python: >=3.10
Provides-Extra: all
Requires-Dist: anthropic>=0.40; extra == 'all'
Requires-Dist: openai>=1.0; extra == 'all'
Requires-Dist: pillow>=9.0; extra == 'all'
Requires-Dist: rich>=13.0; extra == 'all'
Requires-Dist: typer>=0.12; extra == 'all'
Provides-Extra: cli
Requires-Dist: rich>=13.0; extra == 'cli'
Requires-Dist: typer>=0.12; extra == 'cli'
Provides-Extra: dev
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.8.0; extra == 'dev'
Provides-Extra: image
Requires-Dist: pillow>=9.0; extra == 'image'
Provides-Extra: llm
Requires-Dist: anthropic>=0.40; extra == 'llm'
Requires-Dist: openai>=1.0; extra == 'llm'
Description-Content-Type: text/markdown

# bbs-ansi-art

Python library for ANSI art — create, view, convert, and repair BBS-era artwork.

## Features

- **Load & Parse**: Read `.ans`, `.asc`, `.diz` files with CP437 encoding
- **SAUCE Metadata**: Full support for reading and writing SAUCE records
- **Render**: Output to terminal, HTML, plain text, or images (PNG)
- **Create**: Programmatic ANSI art creation with fluent builder API
- **Studio**: Interactive terminal studio with file browser
- **LLM Integration**: Style presets and ArtSpec for AI-generated art

## Installation

### Command-line tools (recommended)

Install the `bbs-ansi-art` command globally in an isolated environment:

```bash
uv tool install "bbs-ansi-art[cli]"
```

For the command with all optional features, including PNG rendering and LLM support:

```bash
uv tool install "bbs-ansi-art[all]"
```

### Library

Install the library into your project's environment:

```bash
uv pip install bbs-ansi-art
```

Optional library features:

```bash
uv pip install "bbs-ansi-art[image]"  # PNG rendering (requires Pillow)
uv pip install "bbs-ansi-art[llm]"    # LLM generation support
```

## Quick Start

```python
import bbs_ansi_art as ansi

# Load and display ANSI art
doc = ansi.load("artwork.ans")
print(doc.render())

# Check SAUCE metadata
if doc.sauce:
    print(f"Title: {doc.sauce.title}")
    print(f"Author: {doc.sauce.author}")

# Create new ANSI art programmatically
art = (ansi.create(80)
    .fg(36).bold().text("Hello, BBS World!")
    .newline()
    .reset().text("Welcome back to 1994.")
    .build())
```

## Studio

Launch the interactive ANSI art studio:
```bash
bbs-ansi-art studio ~/Downloads/
bbs-ansi-art view artwork.ans -i
```

## LLM Art Generation (Preview)

```python
from bbs_ansi_art.create import ArtSpec
from bbs_ansi_art.llm import list_styles

# Available styles: acid, ice, blocky, ascii, amiga, dark, neon, minimal
print(list_styles())

# Build a specification for LLM generation
spec = (ArtSpec()
    .with_content("A dragon guarding treasure")
    .with_style("acid")
    .with_dimensions(80, 25)
    .with_instruction("Include fire effects"))
```

## Architecture

```
bbs_ansi_art/
├── core/           # Canvas, Cell, Color, Document
├── codec/          # CP437 encoding, ANSI parser
├── sauce/          # SAUCE metadata read/write
├── render/         # Terminal, HTML, Text renderers
├── create/         # Builder API, ArtSpec
├── io/             # File read/write
├── llm/            # Style presets for AI generation
└── cli/            # Studio and CLI tools
    ├── core/       # Terminal, input handling
    ├── widgets/    # Reusable components
    └── studio/     # Interactive applications
```

## License

MIT License - see [LICENSE](LICENSE) for details.
