diff --git a/README.md b/README.md index d7192c20..bcc6f2ff 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,17 @@ Entries using the same path can be filtered, e.g. to get only volumes (`f36_=sbd http://test-metadaten-nrw.hbz-nrw.de:1339/api/independent-works?filters[f36_][$eq]=sbd&populate=* +### Import SKOS data into strapi + +Actual transformation of SKOS TTL files to JSON happens in https://github.com/acka47/scripts/tree/master/skos2json. + +To import the resulting JSON data into strapi, run: + +```bash +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" +``` + ### Run transformation to lobid data ```bash diff --git a/conf/rpb-systematik-import.flux b/conf/rpb-systematik-import.flux new file mode 100644 index 00000000..26f12084 --- /dev/null +++ b/conf/rpb-systematik-import.flux @@ -0,0 +1,13 @@ +API_URL = "http://test-metadaten-nrw.hbz-nrw.de:1339/api/" + PATH; + +"https://raw.githubusercontent.com/acka47/scripts/master/skos2json/" + INPUT +| open-http +| as-lines +| regex-decode("(?.+)") +| stream-to-triples +| template("{\"${p}\":${o}}") // wrap into 'data' object for strapi +| log-object("Will POST: ") +| open-http(url=API_URL, method="POST", contentType="application/json") +| as-lines +| log-object("POST Response: ") +;