Skip to content

masao/ttl2html

Repository files navigation

ttl2html Ruby test Maintainability

📘 Documentation

Find a detailed documentation at https://ttl2html-doc.readthedocs.io/.

Description

Static site generator for Linked Data.

This tool accepts RDF/Turtle format as input to generate the corresponding HTML files.

The Linked Data Principle [TBL:2006] suggests that identifying things as HTTP URIs (resources) and resolving them on the Web is important. This tool helps to generate a website for a Linked Data dataset and publish it on the Web.

Features

Install with gem install ttl2html

  • RDF/Turtle to HTML files
  • Mapping property labels
  • Mapping title properties
  • ERB templates based on Bootstrap
  • SHACL to documentation for the dataset schema

Usage

You can use a command line tool ttl2html. You need to create a configuration file named config.yml with a YAML format, as follows: One required key for the configuration is base_uri.

base_uri: https://www.example.org/

With this configuration file, you can execute a command:

ttl2html dataset.ttl

The command parses a dataset file and generate a HTML files.

Commandline options

ttl2html --config test.yml dataset.ttl

The command ttl2html accepts the following options:

  • --config file: Read the configuration file from file (Default: config.yml).

Configuration file

You can setup several options on the configuration file, config.yml (default).

base_uri: https://www.example.org/
output_dir: /var/www/html/dataset/
labels:
  http://www.w3.org/1999/02/22-rdf-syntax-ns#type: Class
  http://schema.org/name: Title
site_title: A sample dataset
title_property: http://example.org/title
top_class: http://schema.org/Book

A more detailed instructions can be found at https://ttl2html-doc.readthedocs.io/.

News

2024-12-22

🏆 We received the Technology Award at the LOD Challenge Japan 2024

Bundled tool

There is another tool xlsx2shape to describe a dataset schema using SHACL. See README-xlsx2shape.md for details.

This tool is based on experiences from publishing Japanese Textbook LOD dataset [JP-TEXTBOOK:2017].

References