OpenRefine 3.4; example for export project
This commit is contained in:
parent
61262523ad
commit
b2a0697a46
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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
|
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
|
||||||
# license: MIT License https://choosealicense.com/licenses/mit/
|
# license: MIT License https://choosealicense.com/licenses/mit/
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ function requirements {
|
||||||
echo "Download OpenRefine..."
|
echo "Download OpenRefine..."
|
||||||
mkdir -p "$(dirname "${refine}")"
|
mkdir -p "$(dirname "${refine}")"
|
||||||
curl -L --output openrefine.tar.gz \
|
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}")..."
|
echo "Install OpenRefine in subdirectory $(dirname "${refine}")..."
|
||||||
tar -xzf openrefine.tar.gz -C "$(dirname "${refine}")" --strip 1 --totals
|
tar -xzf openrefine.tar.gz -C "$(dirname "${refine}")" --strip 1 --totals
|
||||||
rm -f openrefine.tar.gz
|
rm -f openrefine.tar.gz
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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
|
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
|
||||||
# license: MIT License https://choosealicense.com/licenses/mit/
|
# license: MIT License https://choosealicense.com/licenses/mit/
|
||||||
|
|
||||||
|
|
18
templates.sh
18
templates.sh
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/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
|
# https://gist.github.com/felixlohmeier/d76bd27fbc4b8ab6d683822cdf61f81d
|
||||||
# license: MIT License https://choosealicense.com/licenses/mit/
|
# license: MIT License https://choosealicense.com/licenses/mit/
|
||||||
|
|
||||||
|
@ -416,6 +416,22 @@ done
|
||||||
monitoring
|
monitoring
|
||||||
echo
|
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 ================================= #
|
# ================================ UTILITIES ================================= #
|
||||||
|
|
||||||
checkpoint "Utilities"; echo
|
checkpoint "Utilities"; echo
|
||||||
|
|
Loading…
Reference in New Issue