From ce6220a0757eac4b044837e1da22db253ce59c9e Mon Sep 17 00:00:00 2001 From: Felix Lohmeier Date: Wed, 12 Aug 2020 17:01:26 +0200 Subject: [PATCH] =?UTF-8?q?Export=20OpenRefine-Projekt=20f=C3=BCr=20Debugg?= =?UTF-8?q?ing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Taskfile.yml | 1 + tasks/02-bibliotheca-main.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 11185bf..8eaa47b 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -39,6 +39,7 @@ tasks: - output/01-bibliotheca-pre/*.tsv generates: - output/02-bibliotheca-main/bibliotheca.csv + - output/02-bibliotheca-main/bibliotheca.openrefine.tar.gz env: REFINE_WORKDIR: output/02-bibliotheca-main REFINE_LOGFILE: log/02-bibliotheca-main/{{.DATE}}.log diff --git a/tasks/02-bibliotheca-main.sh b/tasks/02-bibliotheca-main.sh index d816174..ca7b4c8 100755 --- a/tasks/02-bibliotheca-main.sh +++ b/tasks/02-bibliotheca-main.sh @@ -725,6 +725,20 @@ echo checkpoint "Export"; echo +# Export des OpenRefine-Projekts für Tests +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 + # Export der PICA3-Spalten als CSV # Spalte 2199 muss vorne stehen, weil später für Sortierung benötigt format="csv"