OSLO-SpecificationGenerator is a Python package and CLI to generate HTML specifications from RDF vocabularies.
OSLO-SpecificationGenerator is a Python package to generate HTML documentation for RDF Vocabularies.
- simple configuration: inspired by Python's ConfigParser
- extensible: template architecture allows for easy addition of new metadata formats
- flexible: use as a command-line tool or integrate as a library
OSLO-SpecificationGenerator is best installed and used within a Python virtualenv.
- Python 3.5 and above.
- Python virtualenv package
Dependencies are listed in requirements.txt. Dependencies are automatically installed during specgen's installation.
virtualenv my-env
cd my-env
. bin/activate
git clone https://github.com/InformatieVlaanderen/OSLO-SpecificationGenerator.git
cd OSLO-SpecificationGenerator
pip install -r requirements.txt
python setup.py build
python setup.py install
Leave out the --output
option to write to stdout instead of a file.
./bin/generate_vocabulary.py --help
./bin/generate_vocabulary.py --csv {csv_path} --contributors --target {column} --output {output_path}
./bin/generate_vocabulary.py --rdf {vocabulary_rdf_path} --rdf_contributor {contributors_rdf_path} --merge --output {output_path}
By default the English template will be used.
./bin/generate_vocabulary.py --rdf {rdf_path} --output {output_path}
To use the Dutch template, use the following command.
./bin/generate_vocabulary.py --rdf {rdf_path} --output {output_path} --schema vocabularynl
In this repository only a Dutch template is available.
To use another template, use the --schema_local
option with the path where the other template is located.
See the section on other schemes for more information.
./bin/generate_vocabulary.py --csv {csv_path} --ap --output {output_path}
Same as installing a package. Use a virtualenv. Also install developer requirements:
pip install -r requirements-dev.txt
List of supported metadata schemas in specgen/templates/`
To add support to new metadata schemas:
cp -r specgen/templates/vocabulary specgen/templates/new-schema
Then modify *.j2
files in the new specgen/templates/new-schema
directory to comply to new schema.
# via distutils
python setup.py test
# manually
cd samples
python run_samples.py
All bugs, enhancements and issues are managed on GitHub.