Skip to main content

Generate easily your markdown documentation for any ontology

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ontodoc-0.0.3.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ontodoc-0.0.3-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file ontodoc-0.0.3.tar.gz.

File metadata

  • Download URL: ontodoc-0.0.3.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ontodoc-0.0.3.tar.gz
Algorithm Hash digest
SHA256 061eecdab6076aed8d935d0e20e0f4ef6a417938e24d9c1118a537ab22ef33af
MD5 2af1a90c6c34390787dcde0f8424fb37
BLAKE2b-256 0f37e8c981f8fdc65969b9777645e43aa57cd1d56177d13e23222f1d6eea00cc

See more details on using hashes here.

File details

Details for the file ontodoc-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ontodoc-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for ontodoc-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cf0b26671ae03307b931fea894ec6b58a7640d2dbb0683b5180aa27c2d4b9f9e
MD5 eae120e0c49f3a5e51515c53b2de3660
BLAKE2b-256 11a9357bc4b9724494e233eb2140d1a0fb4758b3fcb05d6f4c10255bef2a8bee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page