Metadata-Version: 2.1
Name: sphinx_image_min
Version: 1.0.7
Summary: This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.
License: MIT
Author: Xsolla Backend
Author-email: xbe@xsolla.com
Requires-Python: >=3.10
Classifier: Framework :: Sphinx :: Extension
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 :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Documentation
Requires-Dist: pillow (>=10.4.0)
Requires-Dist: sphinx (>=7.3.7)
Project-URL: Homepage, https://source.goxbe.io/Core/docs/sphinx_image_min
Project-URL: Issues, https://source.goxbe.io/Core/docs/sphinx_image_min/-/issues
Description-Content-Type: text/markdown

# Sphinx Extension: Image Minimizer

<!-- Badges go here on the same line; PyPi doesn't support `\` or single-multi-line (it'll stack vertically) -->
[![PyPI](https://img.shields.io/pypi/v/sphinx-image-min)](https://pypi.org/project/sphinx-image-min/) [![PyPI - License](https://img.shields.io/pypi/l/sphinx-image-min)](https://opensource.org/licenses/MIT)

## Description

This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.

## Setup

1. Add the following to your `conf.py`:

    ```python
    import sys, os
    
    # Sphinx Minimizer [Optional] Options
    image_min_max_width = 1080  # Default
    ```

## Usage

After a build is complete, images in `build/_images/` will be compressed (lossless, if png). 

## Requirements

- Python>=3.6
- Sphinx>=1.8
- pillow>=10.4.0

This may work with older versions, but has not been tested.

## Entry Point

See `setup(app)` definition at `sphinx_image_min.py`.

## Tested in

- Windows 11 via PowerShell 7
- Ubuntu 22.04 via ReadTheDocs (RTD) CI

## Notes

- `__init__.py` is required for both external pathing and to treat the directory as a pkg

