# WireViz
[![PyPI - Version](https://img.shields.io/pypi/v/wireviz.svg?colorB=blue)](https://pypi.org/project/wireviz/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wireviz.svg?)](https://pypi.org/project/wireviz/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/wireviz)](https://pypi.org/project/wireviz/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
## 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](https://www.graphviz.org/). 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](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (black=BK, red=RD, ...)
<!-- * Optionally outputs colors as abbreviation (e.g. 'YE'), full name (e.g. 'yellow') or hex value (e.g. '#ffff00'), with choice of UPPER or lower case (#158) -->
* Auto-generates standard wire color schemes and allows custom ones if needed
* [DIN 47100](https://en.wikipedia.org/wiki/DIN_47100) (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)
* [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
* [25 Pair Color Code](https://en.wikipedia.org/wiki/25-pair_color_code#Color_coding) (BUWH/WHBU/OGWH/WHOG/GNWH/WHGN/BNWH/...)
* [TIA/EIA 568 A/B](https://en.wikipedia.org/wiki/TIA/EIA-568#Wiring) (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
[WireViz input file](../examples/demo01.yml):
```yaml
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:
![Sample output diagram](../examples/demo01.png)
[Bill of Materials](../examples/demo01.bom.tsv) (auto-generated)
### Demo 02
![](../examples/demo02.png)
[Source](../examples/demo02.yml) - [Bill of Materials](../examples/demo02.bom.tsv)
### Syntax, tutorial and example gallery
Read the [syntax description](syntax.md) to learn about WireViz' features and how to use them.
See the [tutorial page](../tutorial/readme.md) for sample code, as well as the [example gallery](../examples/readme.md) 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](https://graphviz.org/download/) 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](https://pypi.org/project/wireviz/) 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](CONTRIBUTING.md)!
### 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](buildscript.md) of the `build_examples.py` script for info on building the demos, examples and tutorial.
## Changelog
See [CHANGELOG.md](CHANGELOG.md)
## Status
This is very much a work in progress. Source code, API, syntax and functionality may change wildly at any time.
## License
[GPL-3.0](../LICENSE)
Raw data
{
"_id": null,
"home_page": "https://github.com/formatc1702/WireViz",
"name": "wireviz",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "cable connector hardware harness wiring wiring-diagram wiring-harness",
"author": "Daniel Rojas",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/d5/c9/6273dbf96dcad5e58fbccf69e6afe2854a286b66902ceeb52ecf64f5ec9f/wireviz-0.4.tar.gz",
"platform": null,
"description": "# WireViz\n\n\n[![PyPI - Version](https://img.shields.io/pypi/v/wireviz.svg?colorB=blue)](https://pypi.org/project/wireviz/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/wireviz.svg?)](https://pypi.org/project/wireviz/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/wireviz)](https://pypi.org/project/wireviz/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n## Summary\n\nWireViz 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](https://www.graphviz.org/). It handles automatic BOM (Bill of Materials) creation and has a lot of extra features.\n\n\n## Features\n\n* WireViz input files are fully text based\n * No special editor required\n * Human readable\n * Easy version control\n * YAML syntax\n * UTF-8 input and output files for special character support\n* Understands and uses color abbreviations as per [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (black=BK, red=RD, ...)\n <!-- * Optionally outputs colors as abbreviation (e.g. 'YE'), full name (e.g. 'yellow') or hex value (e.g. '#ffff00'), with choice of UPPER or lower case (#158) -->\n* Auto-generates standard wire color schemes and allows custom ones if needed\n * [DIN 47100](https://en.wikipedia.org/wiki/DIN_47100) (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)\n * [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)\n * [25 Pair Color Code](https://en.wikipedia.org/wiki/25-pair_color_code#Color_coding) (BUWH/WHBU/OGWH/WHOG/GNWH/WHGN/BNWH/...)\n * [TIA/EIA 568 A/B](https://en.wikipedia.org/wiki/TIA/EIA-568#Wiring) (Subset of 25-Pair, used in CAT-5/6/...)\n* Understands wire gauge in mm\u00b2 or AWG\n * Optionally auto-calculates equivalent gauge between mm\u00b2 and AWG\n* Is suitable for both very simple cables, and more complex harnesses.\n* Allows for easy-autorouting for 1-to-1 wiring\n* Generates BOM (Bill of Materials)\n\n_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.\n\n\n## Examples\n\n### Demo 01\n\n[WireViz input file](../examples/demo01.yml):\n\n```yaml\nconnectors:\n X1:\n type: D-Sub\n subtype: female\n pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI]\n X2:\n type: Molex KK 254\n subtype: female\n pinlabels: [GND, RX, TX]\n\ncables:\n W1:\n gauge: 0.25 mm2\n length: 0.2\n color_code: DIN\n wirecount: 3\n shield: true\n\nconnections:\n -\n - X1: [5,2,3]\n - W1: [1,2,3]\n - X2: [1,3,2]\n -\n - X1: 5\n - W1: s\n```\n\nOutput file:\n\n![Sample output diagram](../examples/demo01.png)\n\n[Bill of Materials](../examples/demo01.bom.tsv) (auto-generated)\n\n### Demo 02\n\n![](../examples/demo02.png)\n\n[Source](../examples/demo02.yml) - [Bill of Materials](../examples/demo02.bom.tsv)\n\n### Syntax, tutorial and example gallery\n\nRead the [syntax description](syntax.md) to learn about WireViz' features and how to use them.\n\nSee the [tutorial page](../tutorial/readme.md) for sample code, as well as the [example gallery](../examples/readme.md) to see more of what WireViz can do.\n\n\n## Usage\n\n### Installation\n\n#### Requirements\n\nWireViz requires Python 3.7 or later.\n\nWireWiz requires GraphViz to be installed in order to work. See the [GraphViz download page](https://graphviz.org/download/) for OS-specific instructions.\n\n_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.\n\n#### Installing the latest release\n\nThe latest WireViz release can be downloaded from [PyPI](https://pypi.org/project/wireviz/) with the following command:\n```\npip3 install wireviz\n```\n\n#### Installing the development version\n\nAccess to the current state of the development branch can be gained by cloning the repo and installing manually:\n\n```\ngit clone <repo url>\ncd <working copy>\ngit checkout dev\npip3 install -e .\n```\n\nIf you would like to contribute to this project, make sure you read the [contribution guidelines](CONTRIBUTING.md)!\n\n### How to run\n\n```\n$ wireviz ~/path/to/file/mywire.yml\n```\n\nDepending on the options specified, this will output some or all of the following files:\n\n```\nmywire.gv GraphViz output\nmywire.svg Wiring diagram as vector image\nmywire.png Wiring diagram as raster image\nmywire.bom.tsv BOM (bill of materials) as tab-separated text file\nmywire.html HTML page with wiring diagram and BOM embedded\n```\n\nWildcards in the file path are also supported to process multiple files at once, e.g.:\n```\n$ wireviz ~/path/to/files/*.yml\n```\n\nTo see how to specify the output formats, as well as additional options, run:\n\n```\n$ wireviz --help\n```\n\n\n### (Re-)Building the example projects\n\nPlease see the [documentation](buildscript.md) of the `build_examples.py` script for info on building the demos, examples and tutorial.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md)\n\n\n## Status\n\nThis is very much a work in progress. Source code, API, syntax and functionality may change wildly at any time.\n\n\n## License\n\n[GPL-3.0](../LICENSE)\n",
"bugtrack_url": null,
"license": "GPLv3",
"summary": "Easily document cables and wiring harnesses",
"version": "0.4",
"project_urls": {
"Homepage": "https://github.com/formatc1702/WireViz"
},
"split_keywords": [
"cable",
"connector",
"hardware",
"harness",
"wiring",
"wiring-diagram",
"wiring-harness"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1148da430542e81a01fddbf2c2b952472f7c096f492c77a922d2557e58d24550",
"md5": "3995a085457759aba5fab257aa8f4204",
"sha256": "63b84abeaa4a95b38e5313752aa58d5db87eeadb0c5784f5a82e140670a8a41f"
},
"downloads": -1,
"filename": "wireviz-0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3995a085457759aba5fab257aa8f4204",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 48771,
"upload_time": "2024-05-12T11:47:18",
"upload_time_iso_8601": "2024-05-12T11:47:18.531700Z",
"url": "https://files.pythonhosted.org/packages/11/48/da430542e81a01fddbf2c2b952472f7c096f492c77a922d2557e58d24550/wireviz-0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d5c96273dbf96dcad5e58fbccf69e6afe2854a286b66902ceeb52ecf64f5ec9f",
"md5": "9fd328a26e967d72727c9c585550994e",
"sha256": "945246d23904e368766e80b10f35df58f98a15cd9872ac79f7cc0f843fe368b3"
},
"downloads": -1,
"filename": "wireviz-0.4.tar.gz",
"has_sig": false,
"md5_digest": "9fd328a26e967d72727c9c585550994e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47436,
"upload_time": "2024-05-12T11:48:35",
"upload_time_iso_8601": "2024-05-12T11:48:35.383118Z",
"url": "https://files.pythonhosted.org/packages/d5/c9/6273dbf96dcad5e58fbccf69e6afe2854a286b66902ceeb52ecf64f5ec9f/wireviz-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-12 11:48:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "formatc1702",
"github_project": "WireViz",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "wireviz"
}