Skip to content

πŸ“‘ A python module to generate markdown documentation for ontologies.

License

Notifications You must be signed in to change notification settings

StephaneBranly/ontodoc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

11 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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}
Loading

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