Skip to content

Export Scenepro entities to Artsdata #3

Export Scenepro entities to Artsdata

Export Scenepro entities to Artsdata #3

name: Export Scenepro entities to Artsdata
on:
workflow_dispatch:
jobs:
transform-scenepro-entities:
runs-on: ubuntu-latest
container:
image: ontotext/refine:1.2.0
options: --user root
ports:
- 7333:7333
steps:
- name: Install requirements
id: step-1
run: apk update && apk add curl && apk add util-linux
- name: Run Onto Refine server
id: step-2
run: /opt/ontorefine/dist/bin/ontorefine &
- name: Download scenepro entities
id: step-3
run: |
curl -X GET 'https://public-api.scenepro.ca/capacoa/organizations/diffuser/0/200?networkId=2' \
-H "Ocp-Apim-Subscription-Key: 44c4455927594abfb8127ec918b93c73;product=capacoa" >> entities.json
- name: Download mapping file
id: step-4
run: |
curl -X GET 'https://raw.githubusercontent.com/culturecreates/artsdata-planet-scenepro/main/ontorefine/mapping.json' >> mapping.json
- name: Transform entities in JSON to RDF
id: step-5
run: |
/opt/ontorefine/dist/bin/ontorefine-cli \
transform entities.json \
-u http://localhost:7333 \
--configurations mapping.json \
-f json >> scenepro-entities.ttl
- name: Commit changes to GitHub
id: step-6
run: |
git pull
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
git add scenepro-entities.ttl
git commit -m "Add ScenePro entities TTL file"
git push