An open API service indexing awesome lists of open source software.

https://github.com/cefriel/controlled-vocabulary-template

Template repository for controlled vocabularies
https://github.com/cefriel/controlled-vocabulary-template

Last synced: 5 months ago
JSON representation

Template repository for controlled vocabularies

Awesome Lists containing this project

README

          

# controlled-vocabulary-template

Template repository for controlled vocabularies. The example controlled vocabulary is published as https://knowledge.c-innovationhub.com/my-controlled-vocabulary.

| Prefix | IRI |
| -- | ------- |
| my-prefix: | [https://knowledge.c-innovationhub.com/my-controlled-vocabulary#](https://knowledge.c-innovationhub.com/my-controlled-vocabulary) |

## How to

Create a repository starting from this template repository. Rename the folders and the repository accordingly to the identifier of the controlled vocabulary. The new controlled vocabulary name should be used to replace `my-controlled-vocabulary` in all the places.

1. The RDF files describing the controlled vocabularies can be defined manually or by modifying the template Excel file [my-controlled-vocabulary.xlsx](.my-controlled-vocabulary/my-controlled-vocabulary.xlsx). Documentation on how to create more advanced Excel files can be found [here](https://xls2rdf.sparna.fr/rest/doc.html).

2. Download the tools as discussed below and put the JARs in the `tools` folder to automatise their execution through the `run.sh` script. A Java installation is required.

### `xls2rdf`: Excel to RDF
Download release JAR from [here](https://github.com/sparna-git/xls2rdf/releases) and rename it as `xls2rdf.jar`. You can alternatively use the user interface available at https://skos-play.sparna.fr/play/convert. Documentation for the CLI tool is available [here](https://github.com/sparna-git/xls2rdf/wiki/Command-line-Excel-to-RDF-conversion). The `run.sh` script was tested with version `2.2.0`.

### `widoco`: RDF to HTML
Download release JAR from [here](https://github.com/dgarijo/Widoco/releases) and rename it as `widoco.jar`. Documentation for the CLI tool is available [here](https://github.com/dgarijo/Widoco#how-to-use-widoco). The `run.sh` script was tested with version `1.4.21`.

3. Execute the `sh run.sh x.y.z` script providing as argument the correct version number. The version number should be the same declared in the Excel file.

4. Edit the documentation in the [sections](.my-controlled-vocabulary/sections) folder

5. Git commit and push

6. Enable GitHub Pages to host the controlled vocabulary

7. Configure a webserver by using the provided [.htaccess](.my-controlled-vocabulary/.htaccess) file

## Additional notes

- If the taxonomy has more than one level, the `skos-play-cli` tool ([link](https://github.com/sparna-git/skos-play)) can be used to generate a hierarchical visualisation of the taxonomy through the following command:
```bash
java -jar ./tools/skos-play-cli.jar hierarchical -i ./my-controlled-vocabulary/my-controlled-vocabulary.ttl -o ./my-controlled-vocabulary/hierarchy.html -f html -l en
```
The generated file should be manually added to or referred from the Widoco documentation.