@jeswr/shacl2shex
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

shacl2shex

Convert basic SHACL shapes to ShEx

GitHub license npm version build Dependabot semantic-release

Usage

import { DatasetCore } from '@rdfjs/types';
import { shaclStoreToShexSchema, writeShexSchema } from '@jeswr/shacl2shex';

// Creates the ShexJ schema
const schema = await shaclStoreToShexSchema(store);

// Writes the ShexJ schema to .shex
console.log(await writeShexSchema(schema, prefixes));

⚠️ This library is hacked together. Unsupported features include:

  • sh:or, sh:and and sh:xone
  • Property paths

CLI Usage

npx shacl2shex "input <filePath|directory|url>" "output <filePath|directory>"

e.g.

npx shacl2shex https://www.w3.org/ns/shacl-shacl#ShapeShape Shacl.shex

License

©2024–present Jesse Wright, MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @jeswr/shacl2shex

Weekly Downloads

44

Version

1.1.0

License

MIT

Unpacked Size

40.4 kB

Total Files

19

Last publish

Collaborators

  • jeswr