Revert "Statusprüfungen in Taskfiles der Datenquelle #9"
This reverts commit 1286c8177b
.
This commit is contained in:
parent
489a5cf5b7
commit
3760451b36
20
Taskfile.yml
20
Taskfile.yml
|
@ -56,6 +56,10 @@ tasks:
|
|||
- rm -f *.xml
|
||||
# Identifier als Dateinamen
|
||||
- for f in xx*; do mv "$f" "$(xmllint --xpath "//*[local-name(.) = 'recordIdentifier']/text()" "$f").xml"; done
|
||||
sources:
|
||||
- ../refine/{{.PROJECT}}.txt
|
||||
generates:
|
||||
- ./*.xml
|
||||
|
||||
validate:
|
||||
dir: data/{{.PROJECT}}
|
||||
|
@ -64,6 +68,10 @@ tasks:
|
|||
# Validierung gegen METS Schema
|
||||
- wget -q -nc https://www.loc.gov/standards/mets/mets.xsd
|
||||
- xmllint --schema mets.xsd --noout split/*.xml > validate.log 2>&1
|
||||
sources:
|
||||
- split/*.xml
|
||||
generates:
|
||||
- validate.log
|
||||
|
||||
zip:
|
||||
dir: data/{{.PROJECT}}
|
||||
|
@ -71,6 +79,10 @@ tasks:
|
|||
- test -n "{{.PROJECT}}"
|
||||
# ZIP-Archiv mit Zeitstempel erstellen
|
||||
- zip -q -FS -j {{.PROJECT}}_{{.DATE}}.zip split/*.xml
|
||||
sources:
|
||||
- split/*.xml
|
||||
generates:
|
||||
- "{{.PROJECT}}_{{.DATE}}.zip"
|
||||
|
||||
diff:
|
||||
dir: data/{{.PROJECT}}
|
||||
|
@ -85,6 +97,10 @@ tasks:
|
|||
- if (( 500 < $(wc -l <diff.log) )); then echo 1>&2 "Unerwartet große Änderungen in $PWD/diff.log!" && exit 1; fi
|
||||
# Diff archivieren
|
||||
- cp diff.log {{.PROJECT}}_{{.DATE}}.diff
|
||||
sources:
|
||||
- split/*.xml
|
||||
generates:
|
||||
- diff.log
|
||||
status:
|
||||
# Task nicht ausführen, wenn weniger als zwei ZIP-Archive vorhanden
|
||||
- test -z $(ls -t *.zip | sed -n 2p)
|
||||
|
@ -100,6 +116,10 @@ tasks:
|
|||
- rm -rf links.txt
|
||||
# Logdatei auf status code != 2XX prüfen
|
||||
- if grep '^[^2]' linkcheck.log; then echo 1>&2 "Logdatei $PWD/linkcheck.log enthält problematische status codes!" && exit 1; fi
|
||||
sources:
|
||||
- split/*.xml
|
||||
generates:
|
||||
- linkcheck.log
|
||||
|
||||
delete:
|
||||
dir: data/{{.PROJECT}}
|
||||
|
|
|
@ -3,16 +3,22 @@
|
|||
version: '3'
|
||||
|
||||
tasks:
|
||||
# Tasks mit ":" sind für alle Datenquellen gleich in Taskfile.yml definiert
|
||||
default:
|
||||
desc: OPUS Siegen
|
||||
deps: [harvest]
|
||||
cmds:
|
||||
- task: refine
|
||||
- task: check
|
||||
- task: split
|
||||
- task: validate
|
||||
- task: zip
|
||||
- task: diff
|
||||
- task: :check
|
||||
vars: {PROJECT: "siegen", MINIMUM: "1250"}
|
||||
- task: :split
|
||||
vars: {PROJECT: "siegen"}
|
||||
- task: :validate
|
||||
vars: {PROJECT: "siegen"}
|
||||
- task: :zip
|
||||
vars: {PROJECT: "siegen"}
|
||||
- task: :diff
|
||||
vars: {PROJECT: "siegen"}
|
||||
|
||||
harvest:
|
||||
dir: data/siegen/harvest
|
||||
|
@ -74,7 +80,6 @@ tasks:
|
|||
# Temporäre Dateien löschen
|
||||
- rm -rf ./*.project* && rm -f workspace.json
|
||||
sources:
|
||||
# wenn "dir:" für task gesetzt ist, dann relative Links ausgehend von dir
|
||||
- ../harvest/siegen.xml
|
||||
- ../../../rules/siegen/*.json
|
||||
- ../../../rules/siegen/template.txt
|
||||
|
@ -84,61 +89,11 @@ tasks:
|
|||
- siegen.txt
|
||||
- siegen.openrefine.tar.gz
|
||||
|
||||
check:
|
||||
cmds:
|
||||
# Tasks mit ":" sind für alle Datenquellen gleich in Taskfile.yml definiert
|
||||
- task: :check
|
||||
vars: {PROJECT: "siegen", MINIMUM: "1250"}
|
||||
sources:
|
||||
# wenn "dir:" für task nicht gesetzt ist, dann relative Links ausgehend von Taskfile.yml
|
||||
- data/siegen/refine/openrefine.log
|
||||
- data/siegen/refine/siegen.txt
|
||||
|
||||
split:
|
||||
cmds:
|
||||
- task: :split
|
||||
vars: {PROJECT: "siegen"}
|
||||
sources:
|
||||
- data/siegen/refine/siegen.txt
|
||||
generates:
|
||||
- data/siegen/split/*.xml
|
||||
|
||||
validate:
|
||||
cmds:
|
||||
- task: :validate
|
||||
vars: {PROJECT: "siegen"}
|
||||
sources:
|
||||
- data/siegen/split/*.xml
|
||||
generates:
|
||||
- data/siegen/validate.log
|
||||
|
||||
zip:
|
||||
cmds:
|
||||
- task: :zip
|
||||
vars: {PROJECT: "siegen"}
|
||||
sources:
|
||||
- data/siegen/split/*.xml
|
||||
generates:
|
||||
- data/siegen/siegen_{{.DATE}}.zip
|
||||
|
||||
diff:
|
||||
cmds:
|
||||
- task: :diff
|
||||
vars: {PROJECT: "siegen"}
|
||||
sources:
|
||||
- data/siegen/split/*.xml
|
||||
generates:
|
||||
- data/siegen/diff.log
|
||||
|
||||
linkcheck:
|
||||
desc: OPUS Siegen links überprüfen
|
||||
cmds:
|
||||
- task: :linkcheck
|
||||
vars: {PROJECT: "siegen"}
|
||||
sources:
|
||||
- data/siegen/split/*.xml
|
||||
generates:
|
||||
- data/siegen/linkcheck.log
|
||||
|
||||
delete:
|
||||
desc: OPUS Siegen cache löschen
|
||||
|
|
|
@ -9,11 +9,16 @@ tasks:
|
|||
deps: [harvest]
|
||||
cmds:
|
||||
- task: refine
|
||||
- task: check
|
||||
- task: split
|
||||
- task: validate
|
||||
- task: zip
|
||||
- task: diff
|
||||
- task: :check
|
||||
vars: {PROJECT: "wuppertal", MINIMUM: "1300"}
|
||||
- task: :split
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
- task: :validate
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
- task: :zip
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
- task: :diff
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
|
||||
harvest:
|
||||
dir: data/wuppertal/harvest
|
||||
|
@ -77,7 +82,6 @@ tasks:
|
|||
# Temporäre Dateien löschen
|
||||
- rm -rf ./*.project* && rm -f workspace.json
|
||||
sources:
|
||||
# wenn "dir:" für task gesetzt ist, dann relative Links ausgehend von dir
|
||||
- ../harvest/wuppertal.xml
|
||||
- ../../../rules/wuppertal/*.json
|
||||
- ../../../rules/wuppertal/template.txt
|
||||
|
@ -87,61 +91,11 @@ tasks:
|
|||
- wuppertal.txt
|
||||
- wuppertal.openrefine.tar.gz
|
||||
|
||||
check:
|
||||
cmds:
|
||||
# Tasks mit ":" sind für alle Datenquellen gleich in Taskfile.yml definiert
|
||||
- task: :check
|
||||
vars: {PROJECT: "wuppertal", MINIMUM: "1300"}
|
||||
sources:
|
||||
# wenn "dir:" für task nicht gesetzt ist, dann relative Links ausgehend von Taskfile.yml
|
||||
- data/wuppertal/refine/openrefine.log
|
||||
- data/wuppertal/refine/wuppertal.txt
|
||||
|
||||
split:
|
||||
cmds:
|
||||
- task: :split
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
sources:
|
||||
- data/wuppertal/refine/wuppertal.txt
|
||||
generates:
|
||||
- data/wuppertal/split/*.xml
|
||||
|
||||
validate:
|
||||
cmds:
|
||||
- task: :validate
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
sources:
|
||||
- data/wuppertal/split/*.xml
|
||||
generates:
|
||||
- data/wuppertal/validate.log
|
||||
|
||||
zip:
|
||||
cmds:
|
||||
- task: :zip
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
sources:
|
||||
- data/wuppertal/split/*.xml
|
||||
generates:
|
||||
- data/wuppertal/wuppertal_{{.DATE}}.zip
|
||||
|
||||
diff:
|
||||
cmds:
|
||||
- task: :diff
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
sources:
|
||||
- data/wuppertal/split/*.xml
|
||||
generates:
|
||||
- data/wuppertal/diff.log
|
||||
|
||||
linkcheck:
|
||||
desc: Elpub Wuppertal links überprüfen
|
||||
cmds:
|
||||
- task: :linkcheck
|
||||
vars: {PROJECT: "wuppertal"}
|
||||
sources:
|
||||
- data/wuppertal/split/*.xml
|
||||
generates:
|
||||
- data/wuppertal/linkcheck.log
|
||||
|
||||
delete:
|
||||
desc: Elpub Wuppertal cache löschen
|
||||
|
|
Loading…
Reference in New Issue