Authors: Skvortsov Vladimir, Aptukov Mikhail, Markov Mikhail, Khamidullin Ilsaf, Afanasyev Andrew.
Ontol DSL Parser is a command-line tool for parsing and visualizing ontology files written in the Ontol DSL. It generates JSON representations and PlantUML diagrams from .ontol
files.
Explore Ontol DSL in the Online REPL
- Parse
.ontol
files to extract ontology structures. - Serialize ontology to JSON format.
- Generate PlantUML diagrams from ontology.
- Automatically render PlantUML diagrams to PNG images.
- Watch files for changes and re-parse them automatically.
- Display version and help information.
- Python 3.9 or higher.
Install from PyPi:
pip install ontol
To parse an .ontol
file and generate JSON and PlantUML files:
ontol path/to/yourfile.ontol
To watch a file for changes and automatically re-parse it:
ontol path/to/yourfile.ontol --watch
To enable debug mode, which retranslates the output back to the .ontol file:
ontol path/to/yourfile.ontol --debug
To display the version of the program:
ontol --version
To display help information:
ontol --help
To display run tests:
pytest tests
- JSON File: A JSON representation of the ontology is saved with the same basename as the
.ontol
file. - PlantUML File: A
.puml
file is generated for visualization. - PNG Image: A PNG image is rendered from the PlantUML file.
When the --debug
flag is used, the parser retranslates the output back to the .ontol file. This is particularly useful for debugging, as it allows you to verify the accuracy and consistency of the parsing process. The retranslated file is saved with the same name as the original .ontol file, enabling easy comparison between the original and retranslated versions.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes.
- Ensure all tests pass by running
pytest tests
. - Submit a pull request.
This project is licensed under the Apache-2.0 License. See the LICENSE file for details.
- Thanks to the PlantUML team for providing an excellent tool for diagram generation.
- Special thanks to all contributors and users of the Ontol DSL Parser.
- A heartfelt thank you to Danil Pestryakov and Nikita Motorny for their inspiration and support.