Metadata-Version: 2.4
Name: datasette-cldf
Version: 0.3.0
Summary: datasette plugin to explore CLDF datasets
Home-page: https://github.com/cldf/datasette-cldf
Author: Robert Forkel
Author-email: robert_forkel@eva.mpg.de
License: Apache 2.0
Keywords: linguistics
Platform: any
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
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 :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: datasette
Requires-Dist: datasette-template-sql
Requires-Dist: datasette-cluster-map
Requires-Dist: pycldf>=1.12.1
Requires-Dist: cldfbench
Requires-Dist: clldutils
Requires-Dist: uritemplate
Requires-Dist: zenodoclient>=0.3
Provides-Extra: dev
Requires-Dist: flake8; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: build; extra == "dev"
Provides-Extra: test
Requires-Dist: asgiref; extra == "test"
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Dynamic: license-file

# datasette-cldf

[Datasette](https://datasette.readthedocs.io/en/stable/) plugin to explore CLDF datasets

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


[CLDF](https://cldf.clld.org) datasets can be easily loaded into SQLite databases 
(running the `cldf createdb` command provided with [`pycldf`](https://pypi.org/project/pycldf)). Thus, they can be readily explored via the web interface provided by
datasette.

This plugin exploits the "semantics" of CLDF to customize datasette, e.g. to display
[glottocode](https://cldf.clld.org/v1.0/terms.rdf#glottocode) columns as hyperlinks to https://glottolog.org or to display rows of an [`ExampleTable`](https://github.com/cldf/cldf/tree/master/components/examples) component as interlinear glossed text, i.e. with
aligned morphemes and glosses.


## Usage

`datasette-cldf` customizes datasette by providing
- custom [datasette metadata](https://datasette.readthedocs.io/en/stable/metadata.html)
- custom templates
- and custom configuration.

Thus, instead of calling the `datasette` cli directly, ỳou call the `datasette.serve` subcommand, which this package registers with [`cldfbench`](https://github.com/cldf/cldfbench/blob/master/README.md#commands):
```shell script
cldfbench datasette.serve PATH/TO/CLDF/DATASET
```


## Features

We'll show the customizations provided by this plugin with a series of screenshots
of datasette serving the [World Atlas of Language Structures](https://wals.info) 
and the [Glottolog](https://glottolog.org) data, respectively.

- Languages are displayed on a map

![](doc/wals_languages_map.png)

- Language details also show a map

![](doc/wals_language_details.png)
![](doc/glottolog_language_details.png)

- and link to feature values of the language for WALS

  ![](doc/wals_values_for_language.png)

  and values for the Glottolog "parameters" for Glottolog

  ![](doc/glottolog_values_for_language.png)

- Feature pages list possible values and their distribution

![](doc/wals_feature.png)

- Sources are formatted according to the [Unified Style Sheet](https://www.linguisticsociety.org/resource/unified-style-sheet) and as BibTeX records

![](doc/wals_source.png)

- Examples are formatted as interlinear glossed text according to the [Leipzig Glossing Rules](https://www.eva.mpg.de/lingua/resources/glossing-rules.php)

![](doc/wals_igt.png)
