From fe6cb90ba2ccdac5fa31cb8e6be7712ce8f625c1 Mon Sep 17 00:00:00 2001 From: Gunnar Andersson Date: Tue, 27 Feb 2024 16:01:36 +0100 Subject: [PATCH] README fix --- other/protobuf/README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/other/protobuf/README.md b/other/protobuf/README.md index a7484fb..70df831 100644 --- a/other/protobuf/README.md +++ b/other/protobuf/README.md @@ -9,3 +9,14 @@ - `protobuf_ast.py` - Dataclass definitions for a Protobuf AST - `protobuf_ast_construction.py` - Define helper functions that build AST nodes - `protobuf_to_ifex.py` - AST Model-to-model transformation Protobuf->IFEX + +## How to run + +For simple conversions or tests, the protobuf_to_ifex.py has a main method and can be run as a script directly. It will print out the +result as IFEX Core IDL in YAML text: + +``` +python protobuf_to_ifex.py +``` + +For developing on top of this module, for example in a direct translation to other format without the IFEX text format as an intermediiate: Import and use the function `proto_ast_from_input(protofile)` followed by `protobuf_to_ifex(proto_ast)` on that result. The latter returns an IFEX AST that can be further processed.