
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
A python module to generate markdown documentation for ontologies.
Based on rdflib
and jinja2
.
pip install ontodoc
python -m ontodoc
By default, the file named ontology.ttl
will be used to generate your documentation in the build
destination folder.
You can easily change settings as you need. Available arguments :
Argument name | Default | Description | Implemented |
---|---|---|---|
-i, --input INPUT | ontology.ttl | Input ontology file | ✅ |
-o, --output OUTPUT | build/ | Output directory for the generated documentation | ✅ |
-t, --templates TEMPLATES | templates/ | Custom templates folder | ✅ |
-f, --footer, --no-footer | true | Add footer for each page | ✅ |
-c, --concatenate, --no-concatenate | false | Concatenate documentation into an unique file | ✅ |
-s, --schema, --no-schema | true | Display schemas | ✅ |
-m, --model MODEL | markdown | Model type for the documentation. markdown, gh_wiki | ❌ |
You can also generate your documentation and access parameters from python as follow :
import ontodoc
ontodoc.Documentation(input_graph='example/foaf.ttl').generate()
You can explore github actions
to automatically generate and publish your documentation. If you need some inspiration to do it, check our ontodoc github action.
Look at the example for foaf to see what type of documentation you can easily build in 2 lines!
If you want to change the markdown templates, take a look at the structure of the default ones.
%% THIS IS A SCHEMA, IF YOU CANNOT SEE IT, PLEASE TRY TO CONSULT THIS PAGE ON GITHUB AND ON A DESKTOP WEB NAVIGATOR
flowchart LR
subgraph s1["Ontodoc"]
mdhrd["Markdown human readable documentation"]
mt["Markdown templates"]
sod["Structured ontology description"]
cli["Command Line Interface"]
end
sod --> mdhrd
mt --> mdhrd
on(("Ontology")) --> cli
cli --> sod
cli -.-> |*Custom templates*|mt
sod@{ shape: braces}
cli@{ shape: text}
Recognized properties available here.
Feel free to contribute to this open source project!
We need help to implement new features, fix bugs listed in issues.
If you have any idea, create your own issue.
Comming soon...
FAQs
Generate easily your markdown documentation for any ontology
We found that ontodoc demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.