Metadata-Version: 2.1
Name: clld-audio-plugin
Version: 2.0.0
Summary: A clld plugin to render linked audio files in clld apps.
Author-email: Robert Forkel <dlce.rdm@eva.mpg.de>
License: Apache-2.0
Project-URL: Homepage, https://github.com/clld/clld-audio-plugin
Keywords: web,pyramid,clld
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
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: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: clld>=7.0
Requires-Dist: sqlalchemy
Requires-Dist: zope.interface
Provides-Extra: initdb
Requires-Dist: pycldf; extra == "initdb"
Requires-Dist: csvw; extra == "initdb"
Provides-Extra: dev
Requires-Dist: ruff; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=5; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-clld; extra == "test"
Requires-Dist: coverage>=4.2; extra == "test"
Requires-Dist: webtest; extra == "test"

# clld-audio-plugin

[![Build Status](https://github.com/clld/clld-audio-plugin/workflows/tests/badge.svg)](https://github.com/clld/clld-audio-plugin/actions?query=workflow%3Atests)
[![PyPI](https://img.shields.io/pypi/v/clld-audio-plugin.svg)](https://pypi.org/project/clld-audio-plugin)

A plugin for the [`clld`](https://pypi.org/project/clld) package.


## Usage

`clld-audio-plugin` provides
- A model class [`clld_audio_plugin.models.Counterpart`](src/clld_audio_plugin/models.py) augmented with an `audio` column to store the URL to an audio file.
- A column for a `DataTable` [`clld_audio_plugin.datatables.AudioCol`](src/clld_audio_plugin/datatables.py) to display objects with an `audio` attribute as audio player.
- A map class [`clld_audio_plugin.maps.ParamMap`](src/clld_audio_plugin/maps.py) specifying a parameter map integrating clld audioplayer functionality.
- Static resources for the configuration/layout of the UI elements contributed by the plugin.

To use map and static resources, include the plugin in your app's `main` function:
```python
    config.include('clld_audio_plugin')
```

To use model and column, just import in your app's `datatables.py` or `models.py` as needed.
