A wrapper around WireViz for bringing it to the web. Easily document cables and wiring harnesses.
Project description
About
WireViz-Web is a wrapper around the excellent WireViz by Daniel Rojas for bringing it to the web.
Originally, it has been conceived within a WireViz fork by Jürgen Key. For compatibility with PlantUML, it includes an URL query parameter decoder by Dyno Fu and Rudi Yardley.
Thanks!
Details
WireViz
WireViz is a tool for easily documenting cables, wiring harnesses and connector pinouts. It takes plain text, YAML-formatted files as input and produces beautiful graphical output (SVG, PNG, …) thanks to GraphViz. It handles automatic BOM (Bill of Materials) creation and has a lot of extra features.
WireViz-Web
WireViz-Web wraps WireViz with a REST API using Flask. It also provides specific rendering endpoints for PlantUML.
Synopsis
Setup:
pip install wireviz-web
Invoke:
# Run server. wireviz-web # Acquire WireViz YAML file. wget https://raw.githubusercontent.com/daq-tools/wireviz-web/main/tests/demo01.yaml # Render images. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:image/svg+xml http --form http://localhost:3005/render yml_file@demo01.yaml Accept:image/png # Render HTML page with SVG image and BOM table. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:text/html # Render BOM in TSV format. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:text/plain # Render BOM in JSON format. http --form http://localhost:3005/render yml_file@demo01.yaml Accept:application/json # Render a PlantUML request. http http://localhost:3005/plantuml/svg/SyfFKj2rKt3CoKnELR1Io4ZDoSa700== http http://localhost:3005/plantuml/png/SyfFKj2rKt3CoKnELR1Io4ZDoSa700==
For visiting the Swagger OpenAPI spec, go to http://localhost:3005/doc.
Tests
Invoke tests, optionally with coverage report:
poe test poe coverage
Development
As this project is still in its infancy, we humbly ask for support from the community. Look around, give it a test drive and submit patches. There are always things to do.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for wireviz_web-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 430c0febb8aa2d55c5cdde9f7b9eb59cb8ca7473dff466d687a538ffacf6f474 |
|
MD5 | 688d8726ff34cc89921c5cb9d2d8940c |
|
BLAKE2b-256 | 664f7d28cee674869a03bbb3c0e6ff02dc8fa5777305dcacbff8381be33ebcb7 |