-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
35 lines (27 loc) · 1.51 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ONTBASE=http://w3id.org/semapv
ROBOT=robot -vvv
DATE ?= $(shell date +%Y-%m-%d)
all: semapv.owl docs/index.html
semapv-terms.owl: semapv-terms.tsv
$(ROBOT) template --template $< --prefix "skos: http://www.w3.org/2004/02/skos/core#" --prefix "semapv: https://w3id.org/semapv/vocab/" \
annotate --ontology-iri $(ONTBASE)/vocab/$@ --version-iri $(ONTBASE)/vocab/releases/$(DATE)/$@ -o $@
semapv-properties.owl: semapv-properties.tsv
$(ROBOT) template --template $< --prefix "skos: http://www.w3.org/2004/02/skos/core#" --prefix "semapv: https://w3id.org/semapv/vocab/" \
annotate --ontology-iri $(ONTBASE)/vocab/$@ --version-iri $(ONTBASE)/vocab/releases/$(DATE)/$@ -o $@
SEMAPV_TERMS_URL=https://docs.google.com/spreadsheets/d/e/2PACX-1vQS6dVyRqEdXCtimXw1nxX77NCmJCfm_2sOL0eCkt_7MlTt8wCNgE8iw9pLACPIuwZDvu64WtsqtREQ/pub?gid=0&single=true&output=tsv
semapv-terms.tsv:
wget "$(SEMAPV_TERMS_URL)" -O $@
semapv.owl: semapv-metadata.owl semapv-terms.owl semapv-properties.owl context.jsonld
$(ROBOT) merge -i semapv-metadata.owl --add-prefixes context.jsonld -i semapv-terms.owl -i semapv-properties.owl \
annotate --ontology-iri $(ONTBASE)/vocab/$@ --version-iri $(ONTBASE)/vocab/releases/$(DATE)/$@ \
merge --add-prefixes context.jsonld -o $@
docs/index.html: semapv.owl
pip install pylode
python -m pylode $< -o $@
.PHONY: help
help:
@echo "$$data"
@echo "----------------------------------------"
@echo " Command reference: semapv"
@echo "----------------------------------------"
@echo "all: build docs and semapv vocabulary"