Skip to content

Instantly share code, notes, and snippets.

@VladimirAlexiev
Created February 7, 2017 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladimirAlexiev/0a0020761e3b9474b9c2656e85d3074f to your computer and use it in GitHub Desktop.
Save VladimirAlexiev/0a0020761e3b9474b9c2656e85d3074f to your computer and use it in GitHub Desktop.
Assemble Getty Vocabulary Program ontology and generate doc with Parrot

Simon Cox at LOV "Looks like Parrot is no longer functional. It used to render my ontologies just fine, but now getting consistent error "

Parrot works ok now (7 Feb 2017) but prudent people make a local copy of their ontology documentation, eg see http://vocab.getty.edu/ontology. Here's how:

  1. Generate your Parrot doc once and save the report dir (84 files in 3 subdirs)
  2. Do whatever magic you need to assemble your ontology
  3. Run the above script that feeds ontology.ttl to Parrot, chops off unneeded stuff and saves ontology.html
  4. Deploy together with the report dir
# assemble your ontology. Provide Turtle, RDF, maybe JSONLD
conv -U *.ttl
cat ontology-intro.ttl prefixes.ttl ontology-part.ttl getty-codes.ttl ../assoc-rels/assoc-rels.ttl > ontology.ttl
rdfcat ontology.ttl > ontology.rdf
# generate HTML documentation
curl -X POST -F datafile=@ontology.ttl -F mimetypeFile=text/n3 -o ontology.html http://ontorule-project.eu/parrot/parrot
perl -n -e 'print unless m{<!-- Feedback -->} .. m{<!-- standalone -->}' -i.bak ontology.html
rm ontology.html.bak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment