Skip to main content

ontodoc logo

ontodoc

PyPIVersion PyPI - Downloads GitHub License

A python module to generate markdown documentation for ontologies.

Based on rdflib and jinja2.

Getting Started 🚀

Installation

pip install ontodoc

Command line usage

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 ❌

Python generation

You can also generate your documentation and access parameters from python as follow :

import ontodoc
ontodoc.Documentation(input_graph='example/foaf.ttl').generate()

Automatically generate your documentation

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.

Example 👀

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.

How does it work ? 🔧

%% 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.

Contributing </>

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.

License 🔓

Apache License 2.0

They already have integrated Ontodoc ♥️

Comming soon...

Metadata

Release files for ontodoc 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ontodoc 0.0.5
File Size Uploaded
ontodoc-0.0.5.tar.gz 14.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ontodoc 0.0.5
File Interpreter ABI Platform
ontodoc-0.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / ontodoc-0.0.5.tar.gz

Download URL ontodoc-0.0.5.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7e731ccabbf08685399bf59002ff69dfc4822b739490ce6b03f8381ad84d1085
BLAKE2b-256 checksum
How to use checksums
d43c15456c19683332536465b0cb7fe6f3c66d50590e2bc0840e03d7158b6877
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / ontodoc-0.0.5-py3-none-any.whl

Download URL ontodoc-0.0.5-py3-none-any.whl
Size 19.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
96fda554ef355e58f953e66c0be760ed626a9ef849f03aea37d5c931100a7388
BLAKE2b-256 checksum
How to use checksums
d09ed680ee69f2f01626a9e5ff38c749acedc24325b8c1b7ef22601266d54a86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.0.5 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page