open-index/open-npm huggingface dataset:
npm package: @lindas/trifid
Description: Trifid - Lightweight Linked Data Server and Proxy
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# Trifid

Trifid is a Linked Data server that provides a web interface to browse and query RDF data.

One of the main feature is the aibility to dereference URIs and to provide a human-readable representation of the data.

It uses content-negotiation to serialize entities in a file or from a SPARQL endpoint in various formats, including HTML based on customizable templates.

## Documentation

- [GitHub repository](https://github.com/zazuko/trifid?tab=readme-ov-file#readme)
- [Wiki](https://github.com/zazuko/trifid/wiki)

## Support

Issues & feature requests should be reported on [GitHub](https://github.com/zazuko/trifid).

Pull requests are very welcome.

## License

Copyright Zazuko GmbH.

Trifid is licensed under the [Apache License, Version 2.0](./LICENSE).
npm package: @lindas/trifid-core
Description: Trifid Core
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# Trifid Core

<img src="https://cdn.rawgit.com/zazuko/trifid/main/logo.svg" width="140px" height="140px" align="right" alt="Trifid Logo"/>

Just the core parts of Trifid (plugin loader, config handler, ...).
This package doesn't contain any handlers (SPARQL, file system, ...).

If you want a out of the box solution check [`trifid`](https://www.npmjs.com/package/trifid/).
npm package: @lindas/trifid-handler-fetch
Description: Fetch handler for Trifid
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# trifid-handler-fetch

This Trifid plugin exposes an endpoint where you can perform SPARQL queries against a dataset which is loaded from a URL.

The URL can be a local file or a remote resource.

At the start of the server, the dataset is loaded from the URL and stored in memory, using [Oxigraph](https://github.com/oxigraph/oxigraph).
The dataset is not updated automatically when the resource changes.

## Usage

Add the `trifid-handler-fetch` package to your dependencies:

```sh
npm install trifid-handler-fetch
```

And update the Trifid configuration to something similar as shown in the example below.

## Example

This example config uses [The Big Bang Theory dataset](https://www.npmjs.com/package/tbbt-ld/):

```yaml
plugins:
  # […]
  handler-fetch:
    module: "trifid-handler-fetch"
    paths: /query
    config:
      url: https://raw.githubusercontent.com/zazuko/tbbt-ld/master/dist/tbbt.nt
      contentType: application/n-triples
      baseIRI: http://example.com
      graphName: http://example.com/graph
```

## Options

- `url`: URL to the resource which contains the dataset
- `contentType`: the format of the serialization. See below for the supported formats.
- `baseIRI`: the base IRI to use to resolve the relative IRIs in the serialization.
- `graphName`: for triple serialization formats, the name of the named graph the triple should be loaded to.
- `unionDefaultGraph`: for triple serialization formats, if the triples should be loaded to the default graph or to the named graph specified in `graphName`. This impacts also the need or not to query a specific graph in SPARQL queries. Defaults to `false`.
- `queryLogLevel`: the log level for the queries. Defaults to `debug`.

Supported formats:

- [Turtle](https://www.w3.org/TR/turtle/): `text/turtle` or `ttl`
- [TriG](https://www.w3.org/TR/trig/): `application/trig` or `trig`
- [N-Triples](https://www.w3.org/TR/n-triples/): `application/n-triples` or `nt`
- [N-Quads](https://www.w3.org/TR/n-quads/): `application/n-quads` or `nq`
- [N3](https://w3c.github.io/N3/spec/): `text/n3` or `n3`
- [RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/): `application/rdf+xml` or `rdf`
npm package: @lindas/trifid-plugin-graph-explorer
Description: Trifid Graph Explorer plugin
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# trifid-plugin-graph-explorer

[Graph Explorer](https://github.com/zazuko/graph-explorer) for [Trifid](https://github.com/zazuko/trifid).
This plugin does the static file hosting for all Graph Explorer files and renders an index page that points to the given endpoint URL.

## Quick start

Install this Trifid plugin using:

```sh
npm install trifid-plugin-graph-explorer
```

And then add in the `config.yaml` file the following part:

```yaml
plugins:
  # […] your other plugins
  yasgui:
    module: trifid-plugin-graph-explorer
    paths: # by default
      - /graph-explorer
      - /graph-explorer/
    config:
      endpointUrl: https://example.com/query
      # …other configuration fields
```

## Configuration

The following options are supported:

- `endpointUrl`: URL to the SPARQL endpoint which will be used in the YASGUI interface
- `template`: Path to an alternative template (default: `views/graph-explorer.hbs`)
- `acceptBlankNodes`: Show blank nodes

Example:

```yaml
config:
  acceptBlankNodes: false
  dataLabelProperty: rdfs:label | <http://schema.org/name>
  schemaLabelProperty: rdfs:label | <http://schema.org/name>
  language: en
  languages:
    - code: en
      label: English
    - code: de
      label: German
    - code: fr
      label: French
    - code: it
      label: Italian
```
npm package: @lindas/trifid-plugin-i18n
Description: Trifid plugin for i18n support
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# trifid-plugin-i18n

A Trifid plugin to add i18n support to Trifid.

## Usage

Install this Trifid plugin using:

```sh
npm install trifid-plugin-i18n
```

The plugin needs to be added to the Trifid config under the `plugins` property.
It should be loaded before the `locals` plugin and the template engine.
In the following example order 5 is used which works for the default config where the `locals` plugin uses a higher order value.
The config for the [i18n](https://www.npmjs.com/package/i18n) package can be set using the `config` property.
The `directory` configuration field is required, and should point to the directory where you i18n JSON files are stored.
See the [i18n list of configuration options](https://www.npmjs.com/package/i18n#list-of-all-configuration-options) for more details.
Some default values are defined in the `index.js` file.

Example of configuration:

```yaml
plugins:
  # […] your other plugins
  i18n:
    module: "trifid-plugin-i18n"
    order: 5
    config:
      directory: file:locales
      locales:
        - en
        - de
      # …other configuration fields
```
npm package: @lindas/trifid-plugin-iiif
Description: Trifid plugin to handle IIIF data
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# IIIF plugin for Trifid

> [!IMPORTANT]
> This plugin is not used anymore and some things might be broken.
> If you have a specific use case for this plugin, please open an issue.

A trifid plugin to provide data about image and audio/visual files.

It provides data using the [schema](https://iiif.io/api/presentation/3/context.json) defined by the [International Image Interoperability Framework](https://iiif.io)

## Installation

To install the plugin, run:

```sh
npm install @zazuko/trifid-plugin-iiif
```

## Configuration

This is how you can configure the plugin:

```yaml
plugins:
  # […] your other plugins
  iiif:
    module: "@zazuko/trifid-plugin-iiif"
    paths:
      - /iiif/
    config:
      uriPrefix: https://website
      endpointUrl: https://website/query
      endpointUser: optional
      endpointPassword: optional
```

Then, http://localhost:8080/data/1 will use the URI: <https://website/data/1> to fetch all the related data from the https://website/query SPARQL endpoint.

If no `uriPrefix` is given, the plugin will accept a `uri` query parameter.
npm package: @lindas/trifid-plugin-sparql-proxy
Description: Trifid plugin for sparql-proxy
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# Trifid plugin for `sparql-proxy`

## Quick start

Install this Trifid plugin using:

```sh
npm install @zazuko/trifid-plugin-sparql-proxy
```

And then add in the `config.yaml` file the following part:

```yaml
plugins:
  # […] your other plugins
  sparql-proxy:
    module: "@zazuko/trifid-plugin-sparql-proxy"
    paths: /query
    config:
      # The endpoint URL is the only required field
      endpointUrl: https://example.com/query

      # In case your endpoint requires authentication:
      username: admin
      password: secret
      # headers: # Optional headers to be sent with each request
      #   X-Custom-Header: "CustomValue"

      # # In case you want to add support for multiple endpoints
      # # Define the endpoints in the following way (the "default" endpoint is required)
      # # The default endpoint value will override the endpointUrl, username, password and headers values
      # endpoints:
      #   default:
      #     endpointUrl: https://example.com/query
      #     username: admin1
      #     password: secret1
      #     headers:
      #       X-Custom-Header: "CustomValueDefault"
      #   other:
      #     endpointUrl: https://example.com/other-query
      #     username: admin2
      #     password: secret2
      #     headers:
      #       X-Custom-Header: "CustomValueOther"

      # Rewriting configuration
      allowRewriteToggle: true # Allow the user to toggle the rewrite configuration using the `rewrite` query parameter, even if `rewrite` is set to false
      rewrite: false # Rewrite by default
      rewriteQuery: true # Allow rewriting the query (in case of rewriting)
      rewriteResults: true # Allow rewriting the results (in case of rewriting)

      # Configure formats, that can be used as `format` query parameter
      formats:
        ttl: "text/turtle"
        jsonld: "application/ld+json"
        xml: "application/rdf+xml"
        nt: "application/n-triples"
        trig: "application/trig"
        csv: "text/csv"

      # Configure the log level for the queries
      queryLogLevel: debug # Log level for the queries
```
npm package: @lindas/trifid-plugin-spex
Description: Trifid SPEX plugin
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# trifid-plugin-spex

[SPEX](https://github.com/zazuko/spex) for Trifid.

This plugin does the static file hosting for all SPEX files and renders a view page that points to the configured endpoint URL.

## Quick start

Install this Trifid plugin using:

```sh
npm install trifid-plugin-spex
```

And then add in the `config.yaml` file the following part:

```yaml
plugins:
  # […] your other plugins
  spex:
    module: trifid-plugin-spex
    paths: # by default
      - /spex
      - /spex/
    config:
      prefixes:
        - prefix: ex
          namespace: http://example.org/
```

## Configuration

The following options are supported (all of them optional):

- `url`: URL to the SPARQL endpoint which will be used in the SPEX interface
- `user`: User to connect to the SPARQL endpoint
- `password`: Password to connect to the SPARQL endpoint
- `graph`: Default graph to display
- `prefixes`: List of custom prefixes (e.g. `[{ prefix: 'ex', namespace: 'http://example.org' }]`)
- `forceIntrospection`: force introspection
npm package: @lindas/trifid-plugin-yasgui
Description: Trifid YASGUI plugin
Author: Swiss Federal Archives / Lindas
Latest version: 7.1.2

# trifid-plugin-yasgui

YASGUI for Trifid.
This plugin does the static file hosting for all YASGUI files and renders an index page that points to the given endpoint URL.

## Quick start

Install this Trifid plugin using:

```sh
npm install trifid-plugin-yasgui
```

And then add in the `config.yaml` file the following part:

```yaml
plugins:
  # […] your other plugins
  yasgui:
    module: trifid-plugin-yasgui
    paths: # by default
      - /sparql
      - /sparql/
    config:
      endpointUrl: https://example.com/query
      # urlShortener: https://example.com/api/v1/shorten  # Optional: URL shortener service
      defaultQuery: |
        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

        SELECT * WHERE {
          ?sub ?pred ?obj .
        } LIMIT 10
      # …other configuration fields
```

## Configuration

The following options are supported:

- `endpointUrl`: URL to the SPARQL endpoint which will be used in the YASGUI interface. If a path is given instead of a URL, it will be resolved using the absolute URL (default value: `/query`)
- `urlShortener`: URL of an URL Shortener service. It will be called like this (assuming `urlShortener` is `https://example.com/api/v1/shorten`): `https://example.com/api/v1/shorten?url=url-to-your-query` and should return a short URL as plain text (`https://example.com/s/x8Z1a`). If `urlShortener` is not defined, the short URL feature will be disabled in YASGUI.
- `template`: Path to an alternative template (default: `views/yasgui.hbs`)
- `catalog`: Array of SPARQL endpoints that will be shown in the YASGUI interface.
- `defaultQuery`: Default query that will be shown in the YASGUI interface.
- `mapKind`: Map kind to use in the YASGUI interface (default: `default` ; supported values: `default`, `swisstopo`)