Easily document cables and wiring harnesses
Project description
WireViz
Summary
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.
Features
- WireViz input files are fully text based
- No special editor required
- Human readable
- Easy version control
- YAML syntax
- UTF-8 input and output files for special character support
- Understands and uses color abbreviations as per IEC 60757 (black=BK, red=RD, ...)
- Auto-generates standard wire color schemes and allows custom ones if needed
- DIN 47100 (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)
- IEC 60757 (BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
- 25 Pair Color Code (BUWH/WHBU/OGWH/WHOG/GNWH/WHGN/BNWH/...)
- TIA/EIA 568 A/B (Subset of 25-Pair, used in CAT-5/6/...)
- Understands wire gauge in mm² or AWG
- Optionally auto-calculates equivalent gauge between mm² and AWG
- Is suitable for both very simple cables, and more complex harnesses.
- Allows for easy-autorouting for 1-to-1 wiring
- Generates BOM (Bill of Materials)
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.
Examples
Demo 01
connectors:
X1:
type: D-Sub
subtype: female
pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]
X2:
type: Molex KK 254
subtype: female
pinlabels: [GND, RX, TX]
cables:
W1:
gauge: 0.25 mm2
length: 0.2
color_code: DIN
wirecount: 3
shield: true
connections:
-
- X1: [5,2,3]
- W1: [1,2,3]
- X2: [1,3,2]
-
- X1: 5
- W1: s
Output file:
Bill of Materials (auto-generated)
Demo 02
Syntax, tutorial and example gallery
Read the syntax description to learn about WireViz' features and how to use them.
See the tutorial page for sample code, as well as the example gallery to see more of what WireViz can do.
Usage
Installation
Requirements
WireViz requires Python 3.7 or later.
WireWiz requires GraphViz to be installed in order to work. See the GraphViz download page for OS-specific instructions.
Note: Ubuntu 18.04 LTS users in particular may need to separately install Python 3.7 or above, as that comes with Python 3.6 as the included system Python install.
Installing the latest release
The latest WireViz release can be downloaded from PyPI with the following command:
pip3 install wireviz
Installing the development version
Access to the current state of the development branch can be gained by cloning the repo and installing manually:
git clone <repo url>
cd <working copy>
git checkout dev
pip3 install -e .
If you would like to contribute to this project, make sure you read the contribution guidelines!
How to run
$ wireviz ~/path/to/file/mywire.yml
Depending on the options specified, this will output some or all of 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
Wildcards in the file path are also supported to process multiple files at once, e.g.:
$ wireviz ~/path/to/files/*.yml
To see how to specify the output formats, as well as additional options, run:
$ wireviz --help
(Re-)Building the example projects
Please see the documentation of the build_examples.py
script for info on building the demos, examples and tutorial.
Changelog
See CHANGELOG.md
Status
This is very much a work in progress. Source code, API, syntax and functionality may change wildly at any time.
License
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
File details
Details for the file wireviz-0.4.1.tar.gz
.
File metadata
- Download URL: wireviz-0.4.1.tar.gz
- Upload date:
- Size: 50.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e25ad8c2e3a269a7dd4a7f45e4e8d304db7e0432b1843a620acfa6be70570e1 |
|
MD5 | a4be3f47286b04b7f6ba9eadaf15a8ac |
|
BLAKE2b-256 | 683126e518535ae54f540dae0e83e583240d4bae9a883a6213d751b7b0c00304 |
File details
Details for the file wireviz-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: wireviz-0.4.1-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dfdfec91e5d26e4f27f0f9d031672da7fb3c133d127167d233f4742f01873a2 |
|
MD5 | 0f176ac0c8efe13898978fbb572ed0d4 |
|
BLAKE2b-256 | 9d7a5fc147e36159bdf7ff70cdd239e48512384ce32708ef8410df8fd62b4cf8 |