Skip to content

Commit

Permalink
Merge pull request #48 from hbz/test-setup
Browse files Browse the repository at this point in the history
Add script for full localhost test setup (title and authority data)
  • Loading branch information
fsteeg authored Oct 4, 2023
2 parents 7552829 + b9bcb09 commit 48998b4
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ sbt "runMain rpb.ETL conf/rppd-import.flux"

This attempts to import RPPD data to strapi, and prints the server responses.

Same for RPB-Normdaten (`rpb-sw-to-strapi.flux` / `rpb-sw-import.flux`), see also `transformAndImport.sh`.

### Run transformation to lobid data

```bash
Expand Down
3 changes: 2 additions & 1 deletion conf/rpb-systematik-import.flux
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH;
// API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH;
API_URL = "http://localhost:1339/api/" + PATH;

"https://raw.githubusercontent.com/acka47/scripts/master/skos2json/" + INPUT
| open-http
Expand Down
3 changes: 2 additions & 1 deletion conf/rpb-test-titel-import.flux
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
API_URL = "http://localhost:1339/api/" + PATH;
// API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH;
API_URL = "http://localhost:1339/api/" + PATH;

FIX = "
unless " + PICK + "
reject()
Expand Down
4 changes: 3 additions & 1 deletion conf/rpb-titel-import.flux
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH;
// API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH;
API_URL = "http://localhost:1339/api/" + PATH;

FIX = "
unless " + PICK + "
reject()
Expand Down
22 changes: 22 additions & 0 deletions transformAndImport.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -eu
IFS=$'\n\t'

# Notationen
sbt "runMain rpb.ETL conf/rpb-systematik-import.flux INPUT=rpb.ndjson PATH=rpb-notations"
sbt "runMain rpb.ETL conf/rpb-systematik-import.flux INPUT=rpb-spatial.ndjson PATH=rpb-spatials"

# Personen
sbt "runMain rpb.ETL conf/rppd-to-strapi.flux"
sbt "runMain rpb.ETL conf/rppd-import.flux"

# Normdaten
sbt "runMain rpb.ETL conf/rpb-sw-to-strapi.flux"
sbt "runMain rpb.ETL conf/rpb-sw-import.flux"

# Titeldaten
sbt "runMain rpb.ETL conf/rpb-test-titel-to-strapi.flux"
sbt "runMain rpb.ETL conf/rpb-test-titel-import.flux PICK=all_equal('f36_','u') PATH=articles"
sbt "runMain rpb.ETL conf/rpb-test-titel-import.flux PICK=all_equal('f36_','Monografie') PATH=independent-works"
sbt "runMain rpb.ETL conf/rpb-test-titel-import.flux PICK=all_equal('f36_','Band') PATH=independent-works"
sbt "runMain rpb.ETL conf/rpb-test-titel-import.flux PICK=all_equal('f36t','MultiVolumeBook') PATH=independent-works"

0 comments on commit 48998b4

Please sign in to comment.