Documentor¶
kgm.documentor
¶
This script creates a "Prez Resources" table in either Markdown or ASCIIDOC from a Manifest file which it validates first
Run this script with the -h flag for more help, i.e. ~$ python documentor.py -h
Example:
Input:
PREFIX mrr: https://prez.dev/ManifestResourceRoles/ PREFIX prez: https://prez.dev/ PREFIX prof: http://www.w3.org/ns/dx/prof/ PREFIX schema: https://schema.org/
[] a prez:Manifest ; prof:hasResource [ prof:hasArtifact "catalogue.ttl" ; prof:hasRole mrr:ContainerData ; schema:description "The definition of, and medata for, the container which here is a dcat:Catalog object" ; schema:name "Catalogue Definition" ] , [ prof:hasArtifact "vocabs/*.ttl" ; prof:hasRole mrr:ContentData ; schema:description "skos:ConceptScheme objects in RDF (Turtle) files in the vocabs/ folder" ; schema:name "Content" ] , [ prof:hasArtifact "https://github.com/RDFLib/prez/blob/main/prez/reference_data/profiles/ogc_records_profile.ttl" ; prof:hasRole mrr:ContainerAndContentModel ; schema:description "The default Prez profile for Records API" ; schema:name "Profile Definition" ] , [ prof:hasArtifact "_background/labels.ttl" ; prof:hasRole mrr:CompleteContainerAndContentLabels ; schema:description "An RDF file containing all the labels for the container content" ; ] ; .
Output:
| Resource | Role | Description |
|---|---|---|
Catalogue Definition, catalogue.ttl |
Container Data | The definition of, and medata for, the container which here is a dcat:Catalog object |
Content, vocabs/*.ttl |
Content Data | skos:ConceptScheme objects in RDF (Turtle) files in the vocabs/ folder |
Profile Definition, ogc_records_profile.ttl |
Container & Content Model | The default Prez profile for Records API |
Labels file, _background/labels.ttl |
Complete Content and Container Labels | An RDF file containing all the labels for the container content |