From 6a4ad9a5cc192d1d34a0dfac9d5934095e4371b8 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Tue, 21 May 2024 09:38:09 +0200 Subject: reorganize: separate dif for each ontology and knowledge graph --- Makefile | 51 ++++++++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 226e9bf..9a9d649 100644 --- a/Makefile +++ b/Makefile @@ -7,9 +7,9 @@ BASE_IRI = https://thoughtroam.abcdefghijklmnopqrstuvxyzæøå.dk/ PAD_ARTICLES = worlding ARTICLES = waste worlding -ONTOLOGIES = learning waste +ONTOLOGIES = learn waste -GRAPHS = windsurfing +GRAPHS = $(patsubst ex/%.ttl,%,$(wildcard ex/*.ttl)) PERL_FILES = bin/biblatex-tidy bin/hedgedoc2quarto bin/xmp2rdfxml @@ -149,48 +149,57 @@ $(ARTICLES:%=%/b.tex): %/b.tex: mv --force $*/index.tex $@ rm --force _site/b.pdf -rdf/%-concepts.svg: rdf/%.sdm +%/concepts.svg: %/core.sdm sdml draw --diagram concepts -i $< -f svg -o $@ -rdf/%-er.svg: rdf/%.sdm +%/er.svg: %/core.sdm sdml draw --diagram entity-relationship -i $< -f svg -o $@ -rdf/%-uml.svg: rdf/%.sdm +%/uml.svg: %/core.sdm sdml draw --diagram uml-class -i $< -f svg -o $@ -rdf/%.ttl: rdf/%.sdm +%/core.ttl: %/core.sdm sdml convert -i $< -f rdf -o $@ --no-color -rdf/%.puml: rdf/%.ttl rdf/prefixes.ttl +%/core.puml: %/core.ttl %/prefixes.ttl rdfpuml $< -rdf/%.png: rdf/%.puml +%/core.png: %/core.puml plantuml -tpng $< -rdf/%.svg: rdf/%.puml +%/core.svg: %/core.puml plantuml -tsvg $< -rdf/%/index.html: rdf/%.ttl - mkdir --parents rdf/$* - ontospy gendocs --type 2 -x -o $(CURDIR)/rdf/$* $< +ex/%.puml: ex/%.ttl ex/prefixes.ttl + rdfpuml $< + +ex/%.png: ex/%.puml + plantuml -tpng $< -$(ONTOLOGIES:%=view-%-concept-diagram): view-%-concept-diagram: rdf/%-concepts.svg +ex/%.svg: ex/%.puml + plantuml -tsvg $< + +%/index.html: %/core.ttl + mkdir --parents $* + ontospy gendocs --type 2 -x -o $(CURDIR)/$* $< + +$(ONTOLOGIES:%=view-%-concept-diagram): view-%-concept-diagram: %/concepts.svg inkview $< -$(ONTOLOGIES:%=view-%-er-diagram): view-%-er-diagram: rdf/%-er.svg +$(ONTOLOGIES:%=view-%-er-diagram): view-%-er-diagram: %/er.svg inkview $< -$(ONTOLOGIES:%=view-%-uml-diagram): view-%-uml-diagram: rdf/%-uml.svg +$(ONTOLOGIES:%=view-%-uml-diagram): view-%-uml-diagram: %/uml.svg inkview $< -$(ONTOLOGIES:%=view-%-rdfs-graf): view-%-rdfs-graf: rdf/%.ttl +$(ONTOLOGIES:%=view-%-rdfs-graf): view-%-rdfs-graf: %/core.ttl rdfs2dot -f turtle $< | xdot - -#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.svg +#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: %/core.svg # inkview $< -#$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.png -# imv-wayland $< -$(GRAPHS:%=view-%-puml-diagram): view-%-puml-diagram: rdf/%.png +$(ONTOLOGIES:%=view-%-puml-diagram): view-%-puml-diagram: %/core.png + imv-wayland $< +$(GRAPHS:%=view-%-puml-diagram): view-%-puml-diagram: ex/%.png imv-wayland $< -$(ONTOLOGIES:%=render-%-ontology): render-%-ontology: rdf/%/index.html +$(ONTOLOGIES:%=render-%-ontology): render-%-ontology: %/index.html -- cgit v1.2.3