Metadata-Version: 2.4
Name: ascii_art_python
Version: 2.1.1
Summary: A Python library and CLI tool for converting images and videos into ASCII art.
Author-email: Guillem Prieur <prieurguillem38@gmail.com>
Project-URL: Homepage, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python-2
Project-URL: Bug Tracker, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python-2/-/issues
Project-URL: Source Code, https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python-2
Project-URL: Documentation, https://guill_prieur.site-prieur.fr/ascii-art-python-2
Keywords: ascii,ascii-art,image-to-ascii,video-to-ascii,cli,terminal,terminal-graphics,generator,converter
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Terminals
Classifier: Environment :: Console
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
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: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pillow>=10.0.0
Requires-Dist: tqdm>=4.65.0
Requires-Dist: opencv-python-headless>=4.8.0
Requires-Dist: moviepy>=2.0.0
Requires-Dist: numpy>=1.24.0
Requires-Dist: click>=8.0.0
Requires-Dist: importlib_resources; python_version < "3.10"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Dynamic: license-file

# ASCII Art Python - Convert Images & Videos to Terminal Graphics

<div align="center">

[![PyPI version](https://img.shields.io/pypi/v/ascii-art-python)](https://pypi.org/project/ascii-art-python/)
[![Python versions](https://img.shields.io/pypi/pyversions/ascii-art-python)](https://pypi.org/project/ascii-art-python/)
[![PyPI Downloads](https://img.shields.io/pypi/dm/ascii-art-python)](https://pypi.org/project/ascii-art-python/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](https://opensource.org/licenses/MIT)

</div>

ASCII Art Python is a powerful tool to transform your images and videos into ASCII art. Export your creations as text, images, or videos (with audio) and play them directly in your terminal.

## Preview

Below is an example of an image featuring the Python logo:

```
                 ||||||*{{*||||||                 
             ///{{{****{{{{{{{{{{{\\              
             |{{//-\*{{{{{{{{{{{{{{{\             
            |*{*|   |{{{{{{{{{{{{{{{{|            
            |*{{{*-*{{{{{{{{{{{{{{{{{|            
             \{{{{{{{{{{{{{{{{{{{{{{{|            
        -----           /*{{{{{{{{{{{| -----      
   //{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{| |::::::\\  
 //{*****{{{{{{{{{{{{{{{{{{{{{{{{{{{{| |::::::::\ 
-******{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{| |:::::::::-
-{***{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{| .::::::::::-
-{**{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{//  /:::::::::::
*{{{{{{{{{{{{{/-----------------    .:::::::::::::
-{{{{{{{{{{{//  .----------------:::::::::::::::::
-{{{{{{{{{{|  .......::::::::::::::::::::::::::::-
-{{{{{{{{{{| |.....::::::::::::::::::::::::::::::-
 |{{{{{{{{{| |....::::::::::::::::::::::::::::::/ 
 \\{{{{{{{{| |..:::::::::::::::::::::::::::::::/  
   \\-{{{{/| |::::::::::::-----------:::::---/    
            |:::::::::::.\----------\             
            |::::::::::::::::::::::::|            
            |::::::::::::::::::.:::::|            
            |::::::::::::::::|   |:::|            
             |::::::::::::::::\-//::|             
              \\::::::::::::::::::///             
                 |||||:::::::||||                 
```

And below, an example of a video featuring Nyan Cat:

![Example with the Nyan Cat video played in a terminal.](https://gitlab.pprriieeuurr.fr/guill_prieur/ascii-art-python-2/-/raw/main/docs/example.gif)

## Installation

```bash
pip install ascii-art-python
```

OpenCV Note: This module uses opencv-python-headless. To avoid conflicts with opencv-python, it is highly recommended to use a virtual environment (venv).

## Quick Start

### 1. Command-Line Interface (CLI)


```bash
# Display an image in the terminal
aap-echo my_image.jpg -m full_mode
```

```bash
# Export a video to ASCII (.mp4)
aap-export my_video.mp4 result.mp4 -h 100
```

### 2. Python Usageimport ascii_art_python as aap

```python
# Convert an image (Hybrid Mode)
img = aap.full_mode.Image.from_path("photo.jpg", width=500)
print(img)
```

```python
# Play a video in the terminal (Edge-Detection Mode)
vid = aap.old_skool.Video("movie.mp4", fps=15)
vid.print_in_terminal()
```

## Rendering Modes

- New Skool: Density-based (classic shading).
- Old Skool: Edge-detection based (line art style).
- Full Mode: Hybrid combining sharp contours and shading.

## Full Documentation

To check the complete API, class details, and advanced export options, visit: [the doc](https://guill_prieur.site-prieur.fr/ascii-art-python-2/).

## License

Distributed under the MIT License. See LICENSE for more information.
