Metadata-Version: 2.4
Name: dapytains
Version: 1.0.0rc0
Summary: A brief description of dapytains
Home-page: https://github.com/distributed-text-services/MyDapytains
Author: Thibault Clérice
Author-email: thibault.clerice@inria.fr
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: saxonche==12.9.0
Requires-Dist: lxml
Requires-Dist: flask
Requires-Dist: flask-sqlalchemy
Requires-Dist: click
Requires-Dist: uritemplate
Requires-Dist: tqdm
Requires-Dist: dotenv_flow
Requires-Dist: waitress
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

MyDapytains
===========

[![Flask Server Tests](https://github.com/distributed-text-services/MyDapytains/actions/workflows/dts-validator.yml/badge.svg)](https://github.com/distributed-text-services/MyDapytains/actions/workflows/dts-validator.yml) [![Test](https://github.com/distributed-text-services/MyDapytains/actions/workflows/test.yml/badge.svg)](https://github.com/distributed-text-services/MyDapytains/actions/workflows/test.yml)

*The name of the library is completely temporary*.

This library offers a base python implementation of the following functionalities:

- Parsing of machine-actionable citeStructure and citeData to retrieve reference, structure and citable unit metadata within a TEI file 
- Reuse of citeStructure architecture to retrieve and build partial documents, based on provided reference.
- Support for multiple citeStructure, similar to the ?tree parameter of the DTS Specifications.

This library will:

- Provide a base implementation of the DTS API, using python as a server-side language
- Provide some light "caching" features, to avoid reparsing document at query time.

## ToDo

- Support XSL transformation with mediaType dictionary for outputting different data
- Add tests to webapp


## WebApp

You can try the webapp using `python -m dapytains.app.app`. It uses test files at the moment.

## Guidelines

### Document level guidelines

1. For TEI document to be accessible in full, no specific requirements are necessary.
2. For TEI document to have a single citation tree, they must provide at least one element 
   at the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@default='true']/citeStructure`.
3. For TEI document to have multiple citation trees, they must provide at least one element 
   at the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@default='true']/citeStructure` and any number of element matching
   the XPath `/TEI/teiHeader/encodingDesc/refsDecl[@n]/citeStructure`, where `@n` holds the citation tree name.

We are currently figuring out the Resource level metadata.

See one of our test files to check out the minimal requirements: we have one 
[with citeData](./tests/tei/test_citeData_two_levels.xml) and one [with multiple trees](./tests/tei/multiple_tree.xml)

### Collection and Resource level guidelines

Collection and Resource level guidelines can be provided through file named dts-metadata.xml in each subfolder of a 
given repository. We are currently looking at using external file that would help you ingest metadata, while leaving you
the option to load up metadata yourself.

The current schema for the collection catalog ingestion is available in [./tests/catalog/schema.rng](./tests/catalog/schema.rng).


## Support

Funded via the CLLG Project.

Ce travail a bénéficié d’une aide de l’État gérée par l’Agence Nationale de la
Recherche au titre de France 2030 portant la référence « ANR-24-RRII- 0002 » et opéré par
le Programme Inria Quadrant.
