Skip to content

A GitHub Action for normalizing RDF files with rdf-toolkit

License

Notifications You must be signed in to change notification settings

casework/rdf-toolkit-action

Repository files navigation

RDF Toolkit Action

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Continuous Integration Supply Chain Build Docker

Overview

A GitHub Action, Docker image, and pre-commit hook for normalizing RDF files with rdf-toolkit.jar.

Usage

GitHub Action

This capability is expected to be developed in a future release.

pre-commit Hook

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

Docker

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

Credits

The rdf-toolkit.jar tool is obtained from https://github.com/edmcouncil/rdf-toolkit/.

Licensing

Portions of this repository contributed by NIST are governed by the NIST Software Licensing Statement.