A GitHub Action, Docker image, and pre-commit
hook for normalizing RDF files with rdf-toolkit.jar
.
This capability is expected to be developed in a future release.
This documentation assumes you already have pre-commit
installed in your repository. Installation and basic usage instructions for pre-commit
are available at https://pre-commit.com/#install
In your .pre-commit-config.yaml
file, add the following under the repos
key:
repos:
- repo: https://github.com/casework/rdf-toolkit-action
rev: 2.0.3
hooks:
- id: rdf-toolkit-normalizer
args:
- --autofix
As part of this repository, a Dockerfile
and related image are built and maintained in Docker Hub at https://hub.docker.com/repository/docker/kchason/rdf-toolkit-normalizer.
This Docker image can be run to normalize a TTL graph with the following command:
docker run --rm \
-v /path/to/input.ttl:/opt/workdir/input.ttl \
-v /path/to/store/output/:/opt/workdir/output/ \
-e INPUT_TTL_FILE="/opt/workdir/input.ttl" \
-e OUTPUT_TTL_FILE="/opt/workdir/output/output.ttl" \
kchason/rdf-toolkit-normalizer:latest
The rdf-toolkit.jar
tool is obtained from https://github.com/edmcouncil/rdf-toolkit/.
Portions of this repository contributed by NIST are governed by the NIST Software Licensing Statement.