Read-only mirror of https://github.com/Staatsarchiv-Basel-Stadt/LOD-Pipeline — Kanton Basel-Stadt. Issues & pull requests at the source.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-06-17 16:55:35 +02:00
mappings Creates ownership relation 2026-06-16 08:42:57 +02:00
metadata Improves types turtle files 2026-06-17 16:55:35 +02:00
pipelines Adapts graph-name 2023-09-14 11:58:53 +02:00
scripts Ci images 2025-10-01 14:44:29 +02:00
src-gen Creates ownership relation 2026-06-16 08:42:57 +02:00
.gitignore base of the pipeline 2023-07-26 17:11:19 +02:00
.gitlab-ci.yml ci: rename trigger repo 2026-05-20 17:07:05 +02:00
docker-compose.yaml base of the pipeline 2023-07-26 17:11:19 +02:00
package-lock.json base of the pipeline 2023-07-26 17:11:19 +02:00
package.json ci: customize carml-service 2023-07-26 17:27:51 +02:00
README.md docs: fix list 2023-12-06 11:14:29 +01:00

Staatsarchiv-BS Linked Data

This pipeline uses barnard59 to generate triples from a JSON file using a carml mapping.

To generate the mapping files out of the XRM mappings, you can use our Expressive RDF Mapper (XRM) tool.

Quick start

Put your input in a single input.json file in the input directory.

Then run the following:

npm install # install dependencies
npm run start # run the pipeline

You will find the generated triples in the output directory.

Repository structure

  • input: should contain some JSON files (not included in this repository) ; it will be used by the pipeline to generate triples
  • mapping: XRM mapping files, to map fields from the JSON files to specific triples
  • metadata: some static triples that need to be published
  • node_module: contains the source code of all dependencies required to run the pipeline ; it should never be pushed
  • output: contain triple files with the generated triples from the pipeline
  • pipelines: contains the pipeline definition
  • scripts: some useful scripts
  • src-gen: the generated mapping file for carml
  • .gitlab-ci.yml: the GitLab CI pipeline declaration
  • package.json: specify the version of each dependency that is used and define some useful scripts

GitLab CI pipeline

The GitLab CI pipeline is doing the following:

  1. github: this step is only run on a push on the main branch. It pushes the content of the repository we have on GitLab to GitHub.
  2. fetch: this step fetches the latest JSON file for all prefixes defined in the scripts/file_prefix.sh file and will store them in the input directory.
  3. process: there are two main jobs for that step:
    • metadata: this job generates the triples from the Turtle files (extension .ttl) that are stored in the metadata directory into a output/metadata.nt file. That way everything is converted into the right format and is stored into a single file.
    • process: this job splits the JSON files into smaller chunks and run the pipeline on each of them.
  4. store: this step publishes the generated triples from the previous step (every file with .nt extension from the output directory) to the triple store.