Skip to content

Commit

Permalink
Changed Makefile and added CRM properties
Browse files Browse the repository at this point in the history
  • Loading branch information
MontyBitto committed May 14, 2024
1 parent 0ed6f55 commit 3856e9f
Show file tree
Hide file tree
Showing 2 changed files with 311 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

default: images crm-expand.txt

images: manual/img/data-flow.svg manual/img/crm-classes.svg manual/img/nomisma-classes.svg manual/img/n4o-classes.svg manual/img/n4o-all-classes.svg manual/img/crm-pg-example.svg
images: manual/img/data-flow.svg manual/img/crm-classes.svg manual/img/nomisma-classes.svg manual/img/n4o-classes.svg manual/img/n4o-all-classes.svg manual/img/crm-pg-example.svg manual/img/crm-properties.svg

docs:
quarto render manual

manual/img/crm-pg-example.svg: manual/crm-pg-example.pg
pgraph $< --html -t dot | dot -Tsvg -o $@

manual/img/crm-properties.svg: voc/crm-properties.pg
pgraph $< --html -t mmd | mmdc -i - -o $@

manual/img/data-flow.svg: data-flow.pg
pgraph $< --html -t mmd | mmdc -i - -o $@
Expand All @@ -29,7 +32,6 @@ crm-expand.txt: crm-expand.tsv
./expansion-list.pl < $< | sort > $@

crm-expand.tsv: voc/*.pg
cat $^ | pgraph | jq -r 'select(.type=="edge" and any(.labels[]; .=="replacedBy" or .=="superClass" or .==".superProperty"))|[.from,.to]|@tsv' > $@
cat $^ | pgraph | jq -r 'select(.type=="edge" and any(.labels[]; .=="replacedBy" or .=="superClass" or .=="superProperty"))|[.from,.to]|@tsv' > $@
cat $^ | pgraph | jq -r 'select(.type=="node" and .properties.alias)|[.properties.alias[0],.id]|@tsv' >> $@


cat $^ | pgraph | jq -r 'select(.type=="node" and (.properties.alias| not))|[.id,.id]|@tsv' >> $@
Loading

0 comments on commit 3856e9f

Please sign in to comment.