Skip to content

Commit b52ecd7

Browse files
authored
use latest jena apache-jena-5.4.0
1 parent 7963ed0 commit b52ecd7

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

.github/workflows/clean_validate_merge_ttl.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ jobs:
2929
run: |
3030
sudo apt-get update
3131
sudo apt-get install -y default-jre
32-
wget https://dlcdn.apache.org/jena/binaries/apache-jena-4.10.0.tar.gz
33-
tar -xzf apache-jena-4.10.0.tar.gz
34-
echo "$PWD/apache-jena-4.10.0/bin" >> $GITHUB_PATH
32+
wget https://dlcdn.apache.org/jena/binaries/apache-jena-5.4.0.tar.gz
33+
tar -xzf apache-jena-5.4.0.tar.gz
34+
echo "$PWD/apache-jena-5.4.0/bin" >> $GITHUB_PATH
3535
3636
- name: Clean TTL files
3737
run: |
@@ -41,15 +41,25 @@ jobs:
4141
awk '
4242
BEGIN {OFS=FS=""}
4343
{
44+
# Skip lines with VIAF IRIs
45+
if ($0 ~ /viaf\.org/) next
46+
47+
# Percent-encode spaces in URIs
4448
while (match($0, /<[^>]*>/)) {
4549
uri = substr($0, RSTART, RLENGTH)
4650
gsub(/ /, "%20", uri)
4751
$0 = substr($0, 1, RSTART - 1) uri substr($0, RSTART + RLENGTH)
4852
}
53+
54+
# Replace invalid language tags
4955
gsub(/@en-x-srp1/, "@en")
56+
57+
# Remove vertical bars
5058
gsub(/\|/, "")
59+
5160
print
5261
}' "$file" > "cleaned/$fname"
62+
5363
done
5464
5565
- name: Validate TTL files with riot

0 commit comments

Comments
 (0)