Skip to content
Snippets Groups Projects
Commit f973e839 authored by Andreas Schärtl's avatar Andreas Schärtl
Browse files

isabelle-prepare.sh: use python script to fix iris

parent 8fed2de6
No related branches found
No related tags found
No related merge requests found
......@@ -14,6 +14,9 @@ if [ ! $# -eq 1 ]; then
exit 1
fi
script_dir=$(dirname "$0")
cd "$script_dir"
directory="$1"
files=$(find "$directory" -name "*.xz")
......@@ -22,12 +25,12 @@ for file in $files; do
# the filename of the extracted (uncompressed) file
rdf_file=$(echo "$file" | sed 's/\.xz//')
work_file=$(mktemp)
# uncompress, fix iris
xzcat "$file" | ./fix-rdf-file.py > "$work_file"
mv "$work_file" "$rdf_file"
# uncompress, fix iris, compress again
unxz "$file"
sed -i 's/|/%7C/g' "$rdf_file"
sed -i 's/\\/%5C/g' "$rdf_file"
sed -i 's/ /%20/g' "$rdf_file"
sed -i 's/\^/%5E/g' "$rdf_file"
# compress again
gzip "$rdf_file"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment