This repository contains auxiliary vocabularies used in BARTOC encoded in JSKOS data format, and scripts to update and import these vocabularies:
- BARTOC access modes
- BARTOC vocabulary API types
- BARTOC data formats
- Dewey Decimal Classification reduced to the first three digits, including table numbers and English labels
- ISO Language Codes (639-1 and 693-2) and IETF Language Types
- KOS Types Vocabulary
Update and import scripts require command line tools bash, make, curl, jq, and node. Then install required node modules with npm install.
Each vocabulary data is located in a subdirectory $ID (lowercase short name or acronym) with two JSKOS data files:
$ID-scheme.jsonwith information about the vocabulary$ID-concepts.ndjsonwith concepts of the vocabulary
The concepts file can be updated with a Makefile from a CSV file or from an external source, depending in the vocabulary. Each directory further contains a brief README.md giving a title and links to sources and additional resources such as instructions how to update the data. To force re-generation of a concepts file, run:
make -BC $ID
The script import.sh takes a JSKOS-API endpoint URL such as http://localhost:3000/ or https://bartoc.org/api/ as first argument. It adds this URL to the API field of the vocabulary and imports the vocabulary and its concepts.
Environment variable JWT can optionally be set to provide a JWT Token for authentification for import.
Existing schemes and concepts will be overwritten but no concepts will be deleted.