From ac2b5adbcd054f83a69cd0740b220a3db59300f8 Mon Sep 17 00:00:00 2001 From: Aaron Fabbri Date: Thu, 13 Jun 2024 15:57:59 +0000 Subject: [PATCH] Update READMEs --- README.md | 3 ++- dist-readme.md | 41 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 74b1418..5dc1b57 100644 --- a/README.md +++ b/README.md @@ -13,10 +13,11 @@ Define your protocols for webservices, protobuf, Avro, etc., in one place, and a - Generate source code for integration with your favorite languages. - Example python code for processing messages using the schema definitions. +The main readme for the installable python package is [dist-readme.md](dist-readme.md). ## Generated Documenation -Basic markdown documentation is generated by the [generate.py](interface_gen/generate.py) script: +An example of the markdown documentation is generated by the [generate.py](interface_gen/generate.py) script: [docs/generated](docs/generated/index.md) diff --git a/dist-readme.md b/dist-readme.md index eca21cf..b1d7ce3 100644 --- a/dist-readme.md +++ b/dist-readme.md @@ -11,7 +11,42 @@ languages and serialization frameworks, including: - SQL DDL (create table) - .. and of the other formats supported by [Avrotize](https://github.com/clemensv/avrotize). -For more details see the [code -repostitory](https://github.com/getditto/interface-gen) and its -[README.md](https://github.com/getditto/interface-gen/blob/main/README.md) +## Quick Start + +1. Create a virtual environment (optional but recommended), and activate it: + +``` +python -m venv venv +source venv/bin/activate + +``` + +2. Install the package: + +``` +python -m pip install interface-gen +``` + +3. Set up your protocol definitions and output directory. + +``` +mkdir -p my-protocols/v1.0 +mkdir my-output +``` + +Place your Avro IDL definition files (.avdl) in `my-protocols/v1.0` + +4. Run the generator: + +``` +ifgen -i -p my-protocols -o my-output +``` + +## More Details + +For more details see the source code docs: + +- Python [interface\_gen/README.md](interface_gen/README.md) +- Main [README.md](https://github.com/getditto/interface-gen/blob/main/README.md) +- The [code repostitory](https://github.com/getditto/interface-gen)