From a20708e64bc6acf4648d2916f3c969626e24d2e2 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Sun, 6 Apr 2025 23:59:09 +0200 Subject: [PATCH] Build schema --- Makefile | 15 ++++++++++++--- schema.yaml | 11 ----------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 6dfcba6..781bdde 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,25 @@ OUTDIR := public +BASE_URI := https://hacknnext.diy NEXTS = $(wildcard nexts/*) +$(OUTDIR)/schema/index.jsonld: schema.yaml + mkdir -p "$(@D)" + gen-jsonld-context --no-mergeimports --base "https://hacknnext.diy/schema#" schema.yaml >"$@" + +$(OUTDIR)/schema/index.ttl: schema.yaml + mkdir -p "$(@D)" + gen-rdf --no-mergeimports schema.yaml >"$@" + $(OUTDIR)/nexts/%/instructions.pdf: nexts/%/instructions.typ nexts/%/next.yaml $(wildcard parts/*/*) $(wildcard templates/*) mkdir -p "$(@D)" typst compile --root . "$<" "$@" -$(OUTDIR)/nexts/%/index.jsonld: nexts/%/next.yaml schema.yaml +$(OUTDIR)/nexts/%/index.jsonld: nexts/%/next.yaml $(OUTDIR)/schema/index.jsonld mkdir -p "$(@D)" - linkml-convert -t json-ld -s schema.yaml -C Next -o "$@" "$<" + linkml-convert -t json-ld -s schema.yaml -C Next -c "$(BASE_URI)/schema/index.jsonld" -o "$@" "$<" -$(OUTDIR)/nexts/%/index.ttl: nexts/%/next.yaml schema.yaml +$(OUTDIR)/nexts/%/index.ttl: nexts/%/next.yaml $(OUTDIR)/schema/index.ttl mkdir -p "$(@D)" linkml-convert -t ttl -s schema.yaml -C Next -o "$@" "$<" diff --git a/schema.yaml b/schema.yaml index 096fde1..df69f9d 100644 --- a/schema.yaml +++ b/schema.yaml @@ -62,17 +62,6 @@ classes: range: integer required: true minimum_value: 1 - Catalog: - tree_root: true - attributes: - nexts: - multivalued: true - inlined_as_list: true - range: Next - parts: - multivalued: true - inlined_as_list: true - range: Part Transition: class_uri: sf:Transition -- GitLab