Closed rfbaumgartner closed 4 years ago
So far, I use the following command (in the folder that contains the ontologies
folder):
grep -r -e '^class' ontologies | sed 's/.py:class/ import /' | sed 's/(.*):.*$//' | sed 's/\//./g' | sed 's/ontologies/from ontologies/' | grep -v '#' | python3
Now executing ttl2py.py generates a folder structure containing the classes of the ontology:
I wish that the script also generates a file with the following structure:
This file should be put next to the new folder
ontologies
. Executing it will import all the existing classes in said folder and reveal errors in the code.This serves several purposes: