diff --git a/bash-refine.sh b/bash-refine.sh index 19dbedc..afe206f 100644 --- a/bash-refine.sh +++ b/bash-refine.sh @@ -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 diff --git a/minimal.sh b/minimal.sh index 8a601d1..f6db020 100755 --- a/minimal.sh +++ b/minimal.sh @@ -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/ diff --git a/templates.sh b/templates.sh index e3040a3..902b46e 100755 --- a/templates.sh +++ b/templates.sh @@ -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