Metadata-Version: 2.1
Name: datasette-cldf
Version: 0.1.0
Summary: datasette plugin to explore CLDF datasets
Home-page: https://github.com/cldf/datasette-cldf
Author: Robert Forkel
Author-email: forkel@shh.mpg.de
License: Apache 2.0
Platform: any
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.5
Description-Content-Type: text/markdown
Requires-Dist: datasette (>=0.32)
Requires-Dist: datasette-template-sql
Requires-Dist: datasette-cluster-map
Requires-Dist: pycldf (>=1.11.0)
Requires-Dist: cldfbench
Requires-Dist: clldutils
Requires-Dist: jinja2
Requires-Dist: uritemplate
Provides-Extra: dev
Requires-Dist: flake8 ; extra == 'dev'
Requires-Dist: wheel ; extra == 'dev'
Requires-Dist: twine ; extra == 'dev'
Provides-Extra: test
Requires-Dist: mock ; extra == 'test'
Requires-Dist: asgiref ; extra == 'test'
Requires-Dist: pytest (>=4.3) ; extra == 'test'
Requires-Dist: pytest-mock ; extra == 'test'
Requires-Dist: pytest-cov ; extra == 'test'
Requires-Dist: coverage (>=4.2) ; extra == 'test'

# datasette-cldf

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

[![Build Status](https://travis-ci.org/cldf/datasette-cldf.svg?branch=master)](https://travis-ci.org/cldf/datasette-cldf)
[![codecov](https://codecov.io/gh/cldf/datasette-cldf/branch/master/graph/badge.svg)](https://codecov.io/gh/cldf/datasette-cldf)
[![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-metadata.json
```


## 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://github.com/cldf/cldfbench/blob/master/README.md#commands).

- Languages are displayed on a map

![](doc/wals_languages_map.png)

- Language details also show a map

![](doc/wals_language_details.png)

- and link to feature values of the language

![](doc/wals_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)


