Skip to content

factsmission/psps

Repository files navigation

Personal Structured Publishing Space

Create a linked data site serving RDF data from files in a GitHub repository. For example the FactsMission Website is generated by PSPS from the data in the repository at https://github.com/factsmission/website. All RDF data from your GitHub repository will also be accessible via SPARQL.

How to use it?

  • Add a BASEURI file to the root of your repo with the base URI of your data (see below)
  • Start an instance of PSPS
  • Add a webhook in Github notifying http(s)://<your-host>/webhook with the set webhook secret (see below)
  • Add RDF data to your repository
  • To customize the (client-side) rendering of the resource add a renderes.ttlfile to the root of your repository. See the RDF2h-Documentation to learn how the rendering works

Specifying base URI

The file BASEURI in the root of the repository can either directly contain the base URI for the branch containg the file or a JSON object with branch names as keys and base URIs as values. Having such a JSON is handy as it allows to have staging branches with proposed modifications differing from the main branch only in the proposed change and not also in the BASEURI file.

Building

docker-compose build

Starting

You need to get a GitHub personal access token. You can generate one under Account Settings / Developer settings / Personal Access tokens

On Unix

GITHUB_TOKEN="YOUR TOKEN HERE"; WEBHOOK_SECRET="THE WEBHOOK SECRET"; docker-compose up

On windows

 $env:GITHUB_TOKEN = "YOUR TOKEN HERE"
 $env:WEBHOOK_SECRET="THE WEBHOOK SECRET"
 docker-compose up

On Rancher

  • Add Stack for psps
  • Configure using the file docker-compose-no-build.yml, set GITHUB_TOKEN to you GitHub Personal Access Token and WEBHOOK_SECRET to the desired webhook secret.

Setting up the webhook

PSPS will download the data from any GitHub repository that send a requests to the webhook. This means that everybody that knows your webhook secret can publish to your PSPS instance!

Add a Webhook under Project Settings / Webhooks, the Payload URL is http(s)://<your-host>/webhook, as Content type choose application/json, PSPS only needs to be notified on push events.

What's powering PSPS?

PSPS puts together different pieces of software to provide its functionality.

Apache Jena Fuseki

Apache Jena Fuseki is a SPARQL Server providing SPARQL 1.1 protocols. By default PSPS doesn't fully expose the Fuseki interface. However SPARQL queries sent to http(s)://<your-host>/sparql are forwarded to Fuseki.

TLDS / SLDS

The linked data site is provided by SLDS respectively its "templating" extension TLDS.

Apache Clerezza

Apache Clerezza provides the RDF API and Toolkit used in SLDS, TLDS as well as PSPS itsef.

RDF2h / LD2h

The templating mechanism introduced by TLDS bases on RDF2h which allows defining renderers in RDF. It uses LD2h to integrate RDF2h in HTML. LD2h also allows including remote resources alongside the resources originating from the data in the repository.

Packages

No packages published

Languages