Metadata-Version: 2.4
Name: datasette-selective-image-display
Version: 0.1
Summary: A plugin for Datasette that allows users to select columns where they want image urls to render as images.
Author: Chantal M Brousseau
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/ChantalMB/datasette-selective-image-display
Project-URL: Changelog, https://github.com/ChantalMB/datasette-selective-image-display/releases
Project-URL: Issues, https://github.com/ChantalMB/datasette-selective-image-display/issues
Project-URL: CI, https://github.com/ChantalMB/datasette-selective-image-display/actions
Classifier: Framework :: Datasette
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: datasette
Dynamic: license-file

# datasette-selective-image-display

[![PyPI](https://img.shields.io/pypi/v/datasette-selective-image-display.svg)](https://pypi.org/project/datasette-selective-image-display/)
[![Changelog](https://img.shields.io/github/v/release/ChantalMB/datasette-selective-image-display?include_prereleases&label=changelog)](https://github.com/ChantalMB/datasette-selective-image-display/releases)
[![Tests](https://github.com/ChantalMB/datasette-selective-image-display/actions/workflows/test.yml/badge.svg)](https://github.com/ChantalMB/datasette-selective-image-display/actions/workflows/test.yml)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/ChantalMB/datasette-selective-image-display/blob/main/LICENSE)

A plugin for Datasette that renders columns of image urls which you select as images (with the link displayed beneath the image).

## Installation

Install this plugin in the same environment as Datasette.
```bash
datasette install datasette-selective-image-display
```
## Usage

Create the `metadata.yml` file alongside your database, and add the names of the columns which you would like to have display images like so:

```
databases:
  your-database:
    tables:
      your-table:
        plugins:
          datasette-selective-image-display:
            columns: [image_url, thumbnail]
```

Then run with `datasette phitt.db --metadata metadata.yml`. 

If no columns are specified then all columns where images are detected will be renderde.

## Development

To set up this plugin locally, first checkout the code. You can confirm it is available like this:
```bash
cd datasette-selective-image-display
# Confirm the plugin is visible
uv run datasette plugins
```
To run the tests:
```bash
uv run pytest
```
