Skip to content

Commit

Permalink
Add diff
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubklimek committed May 13, 2022
1 parent 4109bc2 commit 1888d66
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions 01/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
diff
*/*
!expected/*
4 changes: 2 additions & 2 deletions 01/expected/rdf/lifted-validation.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
07:07:38 WARN riot :: [line: 2, col: 192] {W124} Non-ascii characters in a namespace URI may not be completely portable: <https://slovn?k.gov.cz/datov?/turistick?-c?le/pojem/>. Resulting RDF URI references are legal.
07:07:38 WARN riot :: [line: 2, col: 192] {W124} Non-ascii characters in a namespace URI may not be completely portable: <https://slovn?k.gov.cz/generick?/mno?stv?/pojem/>. Resulting RDF URI references are legal.
WARN riot :: [line: 2, col: 192] {W124} Non-ascii characters in a namespace URI may not be completely portable: <https://slovn?k.gov.cz/datov?/turistick?-c?le/pojem/>. Resulting RDF URI references are legal.
WARN riot :: [line: 2, col: 192] {W124} Non-ascii characters in a namespace URI may not be completely portable: <https://slovn?k.gov.cz/generick?/mno?stv?/pojem/>. Resulting RDF URI references are legal.
5 changes: 4 additions & 1 deletion 01/run.sh
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
docker run -i --rm -v $PWD:/usr/src/app -v $PWD/../common:/usr/src/common dataspecer < script.sh
docker run -i --rm -v $PWD:/usr/src/app -v $PWD/../common:/usr/src/common dataspecer < script.sh
echo "-----------DIFF-----------"
diff -r expected data > diff
cat diff
3 changes: 2 additions & 1 deletion 01/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ xslt3 -xsl:$SPEC/$SCHEMA/lifting.xslt -s:data/xml/lowered.xml -o:data/rdf/lifted
#pygmentize -g data/rdf/lifted.rdf

echo -------------RDF/XML to Turtle-------------
riot --formatted=turtle data/rdf/lifted.rdf > data/rdf/lifted.ttl 2> data/rdf/lifted-validation.txt
#save output without timestamp so that we can compare it
riot --formatted=turtle data/rdf/lifted.rdf 2>&1 >data/rdf/lifted.ttl | cut -d" " -f2- > data/rdf/lifted-validation.txt

echo -------------Lifted DIFF-------------------
rdfdiff data/rdf/input.ttl data/rdf/lifted.ttl TTL TTL > data/rdf/diff-lifted.txt
Expand Down
5 changes: 4 additions & 1 deletion 02/run.sh
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
docker run -i --rm -v $PWD:/usr/src/app -v $PWD/../common:/usr/src/common dataspecer < script.sh
docker run -i --rm -v $PWD:/usr/src/app -v $PWD/../common:/usr/src/common dataspecer < script.sh
echo "-----------DIFF-----------"
diff -r expected data > diff
cat diff

0 comments on commit 1888d66

Please sign in to comment.