-
Create a venv (1st time only!)
# Example: cd /path/to/omekas-jsonld-to-ttl python3.10 -m venv venv
-
Activate the venv
source venv/bin/activate
-
Install packages from requirements.txt (1st time only!)
# Example: pip install -r requirements.txt
-
Create a
secrets.py
file and set values like these:# Define secrets, like URLs and API-keys # DO NOT COMMIT THIS FILE TO GIT omekas_api_url = "https://your-omeka.hostname.org/api"
-
Change the values in
config.py
-
Run the
main.py
script.IMPORTANT: remove the old files in
data/omekas
anddata/result
if the script has run before!(venv) you@ubnt:~/omekas-jsonld-to-ttl$ python main.py
-
Find the
omekas.ttl
file in thedata/result
folder. This file can be used to upload to a triple store.
This code is adapted from the Colab notebook created by https://github.com/companje/auteursportaal-datamapping.git