🇩🇪 Dieses Repository enthält ein Python-Script, welches die beiden Python-Pakete ebdamame 🫛 und rebdhuhn 🐓 kombiniert, um aus .docx-Dateien maschinenlesbare Tabellen zur Modellierung von edi@energy Entscheidungsbäumen (EBD) zu extrahieren und anschließend in Form echter Graphen zu visualisieren. Diese Entscheidungsbäume sind Teil eines regulatorischen Regelwerks für die deutsche Energiewirtschaft und kommen in der Eingangsprüfung der Marktkommunikation zum Einsatz.
🇺🇸 This repository provides a Python script combining the libraries ebdamame and rebdhuhn in order to render edi@energy Entscheidungsbaumdiagramme (EBD) as both machine-readable tables as well as corresponding graphs in .svg and .uml format.
You can either run the toolchain via Python (requires Docker AND Python to be installed on your machine). Or you can run the entire toolchain in a docker container (requires only Docker).
pip install -r requirements.txtFurther, make sure to have a local instance of kroki up and running via docker (localhost:8125) as described in the rebdhuhn readme.
Run the docker-desktop app on your local maschine and start the local kroki container via
docker-compose up -dRun main.py using your IDE or inside a terminal session via
python main.pyKeep following the on-screen prompts given by the terminal and provide
- the path of the directory containing the .docxedi@energy EBD file
- the path to the output directory
- the desired data formats .json,.dot,.svgor.puml.
Alternatively, the script can simply be executed using the single command
main.py -i <path to .doxc location> -o <output directory> -t json -t dot -t svg -t pumlwhere -i, -o and -t denote the input directory path, the output directory path and the supported data format, respectively.
In this repository:
- create an .envfile with a structure similar toenv.example.
- set the environment variables to meaningful values.
- Login to GitHub Container Registry (GHCR); Use a Personal Access Token (PAT) to login that has access to this repository and at least read:packagesscope
docker login ghcr.io -u YOUR_GITHUB_USERNAME- 
create a docker-compose.yml that looks like this: ebd_toolchain/docker-compose.yaml Lines 1 to 22 in f71c428 
- 
then run: 
docker compose up --abort-on-container-exitYou can find a Github Action with exactly this setup our edi_energy_mirror where it's used to automatically scrape the latest .docx files and pushes the results to machine-readable_entscheidungsbaumdiagramme which is then used by our frontend  entscheidungbaumdiagramm.
Please follow the instructions in our Python Template Repository. And for further information, see the Tox Repository.
You are very welcome to contribute to this template repository by opening a pull request against the main branch, both here and in rebdhuhn and ebdamame.
This repository is part of the Hochfrequenz Libraries and Tools for a truly digitized market communication.