{"id":13565964,"url":"https://github.com/edmondchuc/ontogram","last_synced_at":"2025-07-13T12:03:08.809Z","repository":{"id":57448884,"uuid":"223872327","full_name":"edmondchuc/ontogram","owner":"edmondchuc","description":"Ontogram - an OWL ontology diagram generator","archived":false,"fork":false,"pushed_at":"2024-07-31T14:11:19.000Z","size":161,"stargazers_count":19,"open_issues_count":6,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-13T21:24:16.630Z","etag":null,"topics":["linked-data","ontogram","ontology","owl","plantuml","python","rdf","rdflib","uml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edmondchuc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-25T05:57:22.000Z","updated_at":"2025-04-26T05:08:44.000Z","dependencies_parsed_at":"2024-11-04T19:36:06.668Z","dependency_job_id":"e5909144-8c95-4799-b8fb-b55efb353bf3","html_url":"https://github.com/edmondchuc/ontogram","commit_stats":{"total_commits":11,"total_committers":2,"mean_commits":5.5,"dds":0.09090909090909094,"last_synced_commit":"777ea837bc27d21741d24fc2e716c69cec1db790"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edmondchuc/ontogram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondchuc%2Fontogram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondchuc%2Fontogram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondchuc%2Fontogram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondchuc%2Fontogram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edmondchuc","download_url":"https://codeload.github.com/edmondchuc/ontogram/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edmondchuc%2Fontogram/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260459397,"owners_count":23012531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linked-data","ontogram","ontology","owl","plantuml","python","rdf","rdflib","uml"],"created_at":"2024-08-01T13:01:59.039Z","updated_at":"2025-07-03T21:40:28.404Z","avatar_url":"https://github.com/edmondchuc.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Ontogram\n\n[![PyPI version](https://badge.fury.io/py/ontogram.svg)](https://badge.fury.io/py/ontogram)\n\nAn OWL ontology diagram generator.\n\nCurrently it supports `owl:class`, `rdfs:subClassOf`, `owl:equivalentClass`, datatype properties and domain and range relationships. I am planning to add support for `owl:subClassOf` restrictions soon. \n\n\n## Example output\n\nThe output of [examples/tern-org.ttl](examples/tern-org.ttl).\n\n![generated ontology diagram](examples/tern-org.ttl.txt.png)\n\n\n## Installation\n\nInstall via PyPI for Python 3.\n\n```\npip3 install ontogram\n```\n\n\n## Usage\n\n### Command line application\n\n```\n$ ontogram --help\n\nUsage: ontogram [OPTIONS] ONTOLOGY_FILEPATH\n\n  Ontogram CLI is a tool to generate a diagram from an OWL ontology file.\n\nOptions:\n  --format ['turtle', 'xml', 'nt', 'n3']\n                                  RDF serialization of input file. Default is\n                                  turtle.\n  --help                          Show this message and exit.\n```\n\nUse Ontogram's CLI to generate diagrams of an OWL ontology.\n```\nontogram ontology.ttl\n```\n\nOutput will be 3 files, `ontology.ttl.txt`, `ontology.ttl.png`, `ontology.ttl.svg`.\n\nUse the --format option to specify the RDF serialization of the ontology if it is not Turtle.\n\n\n### Python library\n\nOntogram is a Python library and can be easily integrated with any existing Python application.\n\n```python\nfrom ontogram import Ontogram\n\n# First parameter accepts a file path to the OWL ontology. \n# Second parameter tells Ontogram what RDF format the OWL ontology is in.\nontogram = Ontogram('ontology.ttl', format='turtle')\n\n# Generate a PNG diagram from the OWl ontology and write to disk as 'ontology.ttl.txt'.\nontogram.png_file('ontology.ttl.txt')\n\n# Same as above, but as an SVG diagram. \nontogram.svg_file('ontology.ttl.svg')\n```\n\nSee the [examples](examples) directory for example outputs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondchuc%2Fontogram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedmondchuc%2Fontogram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedmondchuc%2Fontogram/lists"}