formatc1702 / WireViz
- суббота, 27 июня 2020 г. в 00:23:17
Python
Easily document cables and wiring harnesses
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.
Note: WireViz is not designed to represent the complete wiring of a system. Its main aim is to document the construction of individual wires and harnesses.
connectors:
X1:
type: D-Sub
subtype: female
pinout: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
X2:
type: Molex KK 254
subtype: female
pinout: [GND, RX, TX]
cables:
W1:
gauge: 0.25 mm2
length: 0.2
color_code: DIN
wirecount: 3
shield: true
connections:
-
- X1: [5,2,1]
- W1: [1,2,3]
- X2: [1,3,2]
-
- X1: 5
- W1: s
Output file:
Bill of Materials (auto-generated)
See the tutorial page for sample code, as well as the example gallery to see more of what WireViz can do.
$ python3 wireviz.py ~/path/to/file/mywire.yml
This will output the following files
mywire.gv GraphViz output
mywire.svg Wiring diagram as vector image
mywire.png Wiring diagram as raster image
mywire.bom.tsv BOM (bill of materials) as tab-separated text file
mywire.html HTML page with wiring diagram and BOM embedded
This is very much a work in progress. Source code, API, syntax and functionality may change wildly at any time.
Developed and tested using Python 3.7; might not work with older Python versions.
GNU GPLv3