-
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.pyfile 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.pyscript.IMPORTANT: remove the old files in
data/omekasanddata/resultif the script has run before!(venv) you@ubnt:~/omekas-jsonld-to-ttl$ python main.py -
Find the
omekas.ttlfile in thedata/resultfolder. 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