From 8d06434215abfbff1852caa5566f861087942591 Mon Sep 17 00:00:00 2001 From: Pawel Garbacz Date: Thu, 11 May 2023 08:57:26 +0200 Subject: [PATCH 1/5] Update pre-commit --- etc/git-hook/pre-commit | 9 --------- 1 file changed, 9 deletions(-) diff --git a/etc/git-hook/pre-commit b/etc/git-hook/pre-commit index 315c0f2..f3c5507 100644 --- a/etc/git-hook/pre-commit +++ b/etc/git-hook/pre-commit @@ -125,15 +125,6 @@ function serialize() { fi fi - - case ${extension} in - rdf) - ;; - *) - log "Skipping unsupported file $file" - return 0 - esac - if [[ $file =~ .*About.* ]] ; then log "Skipping unsupported file $file" return 0 From d2e6f28f891cc2bf97cd4441de3f8d1cfa974b11 Mon Sep 17 00:00:00 2001 From: Pawel Garbacz Date: Thu, 11 May 2023 08:59:46 +0200 Subject: [PATCH 2/5] Update serialize.sh --- etc/git-hook/serialize.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/etc/git-hook/serialize.sh b/etc/git-hook/serialize.sh index 1fef5fd..0b7658a 100644 --- a/etc/git-hook/serialize.sh +++ b/etc/git-hook/serialize.sh @@ -134,15 +134,6 @@ function serialize() { fi fi - - case ${extension} in - rdf) - ;; - *) - log "Skipping unsupported file $file" - return 0 - esac - if [[ $file =~ .*About.* ]] ; then log "Skipping unsupported file $file" return 0 From 629acb5401ac340578f44405d6d1783dcf15c6ff Mon Sep 17 00:00:00 2001 From: Pawel Garbacz Date: Thu, 11 May 2023 10:02:15 +0200 Subject: [PATCH 3/5] Update pre-commit --- etc/git-hook/pre-commit | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/git-hook/pre-commit b/etc/git-hook/pre-commit index f3c5507..61c69ad 100644 --- a/etc/git-hook/pre-commit +++ b/etc/git-hook/pre-commit @@ -124,6 +124,16 @@ function serialize() { local logcfg="/tmp/sesame-serializer-log" fi fi + + case ${extension} in + rdf) + ;; + ttl) + ;; + *) + log "Skipping unsupported file $file" + return 0 + esac if [[ $file =~ .*About.* ]] ; then log "Skipping unsupported file $file" From a2c086edd0fe960fcdc61dd37b09d4424b6cddf0 Mon Sep 17 00:00:00 2001 From: Pawel Garbacz Date: Thu, 11 May 2023 10:02:57 +0200 Subject: [PATCH 4/5] Update serialize.sh --- etc/git-hook/serialize.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/git-hook/serialize.sh b/etc/git-hook/serialize.sh index 0b7658a..b34d717 100644 --- a/etc/git-hook/serialize.sh +++ b/etc/git-hook/serialize.sh @@ -133,6 +133,16 @@ function serialize() { local logcfg="/tmp/sesame-serializer-log" fi fi + + case ${extension} in + rdf) + ;; + ttl) + ;; + *) + log "Skipping unsupported file $file" + return 0 + esac if [[ $file =~ .*About.* ]] ; then log "Skipping unsupported file $file" From 85401af69e37066d6c1d07ac4342ccd400eed7f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Przemys=C5=82aw=20Gr=C4=85dzki?= Date: Mon, 29 May 2023 19:40:27 +0200 Subject: [PATCH 5/5] use the correct value for option "--target-format" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Przemysław Grądzki --- etc/git-hook/pre-commit | 5 ++++- etc/git-hook/serialize.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) mode change 100644 => 100755 etc/git-hook/pre-commit diff --git a/etc/git-hook/pre-commit b/etc/git-hook/pre-commit old mode 100644 new mode 100755 index 61c69ad..694126e --- a/etc/git-hook/pre-commit +++ b/etc/git-hook/pre-commit @@ -117,6 +117,7 @@ function serialize() { local file="$1" if [ -f "$file" ] ; then local extension="${file##*.}" + local target_format="rdf-xml" if [ -d "$TEMP" ] ; then local logcfg="$TEMP/sesame-serializer-log" else @@ -127,8 +128,10 @@ function serialize() { case ${extension} in rdf) + target_format="rdf-xml" ;; ttl) + target_format="turtle" ;; *) log "Skipping unsupported file $file" @@ -169,7 +172,7 @@ __log_config__ "${java_exe}" -Xmx1g "-Dorg.clapper.avsl.config=${logcfg}" -cp "${RDF_TOOLKIT_JAR}" org.edmcouncil.rdf_toolkit.RdfFormatter \ --source "${file}" \ --target "${file}X" \ - --target-format rdf-xml \ + --target-format ${target_format} \ --use-dtd-subset \ --inline-blank-nodes \ --infer-base-iri diff --git a/etc/git-hook/serialize.sh b/etc/git-hook/serialize.sh index b34d717..81f9546 100644 --- a/etc/git-hook/serialize.sh +++ b/etc/git-hook/serialize.sh @@ -126,6 +126,7 @@ function serialize() { local file="$1" if [ -f "$file" ] ; then local extension="${file##*.}" + local target_format="rdf-xml" if [ -d "$TEMP" ] ; then local logcfg="$TEMP/sesame-serializer-log" else @@ -136,8 +137,10 @@ function serialize() { case ${extension} in rdf) + target_format="rdf-xml" ;; ttl) + target_format="turtle" ;; *) log "Skipping unsupported file $file" @@ -178,7 +181,7 @@ __log_config__ "${java_exe}" -Xmx1g "-Dorg.clapper.avsl.config=${logcfg}" -cp "${RDF_TOOLKIT_JAR}" org.edmcouncil.rdf_toolkit.RdfFormatter \ --source "${file}" \ --target "${file}" \ - --target-format rdf-xml \ + --target-format ${target_format} \ --use-dtd-subset -ibn -ibu \ -sdt implicit rc=$?