OpenRefine 3.4; example for export project

This commit is contained in:
Felix Lohmeier 2020-09-07 15:30:35 +02:00
parent 61262523ad
commit b2a0697a46
3 changed files with 20 additions and 4 deletions

View File

@ -1,5 +1,5 @@
#!/bin/bash
# bash-refine v1.3.2: bash-refine.sh, Felix Lohmeier, 2020-08-01
# bash-refine v1.3.3: bash-refine.sh, Felix Lohmeier, 2020-09-07
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
# license: MIT License https://choosealicense.com/licenses/mit/
@ -63,7 +63,7 @@ function requirements {
echo "Download OpenRefine..."
mkdir -p "$(dirname "${refine}")"
curl -L --output openrefine.tar.gz \
"https://github.com/OpenRefine/OpenRefine/releases/download/3.3/openrefine-linux-3.3.tar.gz"
"https://github.com/OpenRefine/OpenRefine/releases/download/3.4/openrefine-linux-3.4.tar.gz"
echo "Install OpenRefine in subdirectory $(dirname "${refine}")..."
tar -xzf openrefine.tar.gz -C "$(dirname "${refine}")" --strip 1 --totals
rm -f openrefine.tar.gz

View File

@ -1,5 +1,5 @@
#!/bin/bash
# bash-refine v1.3.2: minimal.sh, Felix Lohmeier, 2020-08-01
# bash-refine v1.3.3: minimal.sh, Felix Lohmeier, 2020-09-07
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
# license: MIT License https://choosealicense.com/licenses/mit/

View File

@ -1,5 +1,5 @@
#!/bin/bash
# bash-refine v1.3.2: templates.sh, Felix Lohmeier, 2020-08-01
# bash-refine v1.3.3: templates.sh, Felix Lohmeier, 2020-09-07
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
# license: MIT License https://choosealicense.com/licenses/mit/
@ -416,6 +416,22 @@ done
monitoring
echo
# ------------------------------ EXPORT PROJECT ------------------------------ #
p="csv file example"
format="openrefine.tar.gz"
echo "export ${p} to ${format} file..."
if curl -fs \
--data project="${projects[$p]}" \
"${endpoint}/command/core/export-project" \
> "${workdir}/${p}.${format}"
then
log "exported ${p} (${projects[$p]}) to ${workdir}/${p}.${format}"
else
error "export of ${p} (${projects[$p]}) failed!"
fi
echo
# ================================ UTILITIES ================================= #
checkpoint "Utilities"; echo