-
-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Wire diagrams #282
Comments
I'd quite like to see this, is there documentation on how to create a companion container that the gateway can consume? |
The "protocol" between the gateway and companion containers is not yet formalized but currently we are using HTTP. RequestThe gateway will issue a POST request with the content of the diagram in the body (as plain-text encoded in utf8). ResponseBodyBody contains the image HeaderYou should set the Status code
|
Currently, the registration is not dynamic but I guess we could implement a discovery mechanism 😉 |
https://github.com/jhogendorn/kroki-wireviz I've thrown together a quick POC. if you pull it and run
it supports png/svg as thats what wireviz outputs natively. we could grab a diff lib to convert from svg to arbitrary image formats. I spent a short while setting up a 'more correct' production dockerfile but lost interest in fiddling with it at this POC stage. PR's welcome. |
That's quite nice, I didn't know this tool but I will closely evaluate it because the packaging and dependency management in Python is definitely convoluted and hard to understand!
Nice work 🎉
I will take a closer look in the next days/weeks. Integration-wise, I'm considering using one companion container per technology stack rather than one companion container per diagram library. |
Python package management is really poor in general, and python people seem to be really blind to it. Poetry is.... fine, its better than pip and other solutions. its kind of like npm a bunch of years ago.
I would prioritise for maintainer sanity rather than resource efficiency. combining containers may save you some incredibly minor, unnoticeable amount of resource, but make maintainer complexity much harder. version management, diff tools needing diff versions of python or libraries or whatever. I personally would keep it one thing one container. |
Any new here? |
btw, thanks @jhogendorn. works like charm |
Hi! It doesn't look like the |
Not yet, it will be part of the next release. |
Input
Output
Format:
mywire.gv
GraphViz outputmywire.svg
Wiring diagram as vector imagemywire.png
Wiring diagram as raster imagemywire.bom.tsv
BOM (bill of materials) as tab-separated text filemywire.html
HTML page with wiring diagram and BOM embeddedWe can start by supporting png and svg.
Runtime
Python 3.7
Project
https://github.com/formatc1702/WireViz
The text was updated successfully, but these errors were encountered: