Reads a Dublin Core Tabular Application Profile, with some extensions, and converts it to SHACL.
WARNING: beta version, use at own risk.
Always install in a virtual environment (venv).
pip install tap2shacl
or install from github.
(venv) $ git clone https://github.com/philbarker/TAP2SHACL
(venv) $ cd TAP2SHACL
(venv) $ pip install -r requirements.txt
(venv) $ ./tap2shacl.py --help
usage: tap2shacl.py [-h] [-c «tap config file name»] [-ns «namespace csv file»] [-a «tap metadata csv file»] [-s «shapes csv file»] «tap csv file»
example: path/to/tap2shacl.py tap.csv
tap2shacl includes several modules that deal with reading and processing the application profile:
- APClasses Provides python data classes for metadata application profiles, with methods to populate them.
- TAP2AP uses dctap-python to read a DC TAP (Dublin Core Tabular Application Profile), and some other config files, and converts it to a python application profile (APClasses).
- AP2SHACL exports the python application profile as SHACL.
Requires dctap 0.4.5(alpha) (github repo) which in turn introduces dependencies, notably ruamel.yaml 0.17.10.
Other dependencies are either from the python standard library (e.g. dataclasses, urllib, csv) or mature external packages (e.g. rdflib).