
WireViz: Tool for documenting cables, wiring harnesses and connector pinouts - sohkamyung
https://github.com/formatc1702/WireViz
======
klaasvakie
Man this looks great. So much easier than doing a drawing and you can version
it in git etc.

If you are looking for feature requests :)

    
    
      Twisted pairs
      Ability to add cable braid to cable sections
      Ability to add heatshrink to connector backshells
      Ability to specify labels
    

I had a quick look at the code, looks nice and clean, I might have a go at one
of the easier ones (like labels) a bit liater this week.

edit: formatting

~~~
mschuster91
I'd have another suggestion - sub-shields, especially around twisted pairs,
like cat6 ethernet cable.

------
rudolph9
Is there a yaml or json dialect for general purposes graphviz?

I see wireviz is defined using yaml and builds on graphviz. I’ve always wanted
to do more with graphviz but reluctant to use the [dot language][0] graphviz
uses by default.

[0]:
[http://graphviz.org/doc/info/lang.html](http://graphviz.org/doc/info/lang.html)

~~~
nextaccountic
There are stuff that converts yaml to dot, like
[https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf45705...](https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf457052e2)

but honestly just write dot, it's a simple format

see also [https://codefreezr.github.io/awesome-
graphviz/](https://codefreezr.github.io/awesome-graphviz/)

~~~
rudolph9
Yeah after doing more research I’m leaning towards just writing dot. It does
look nice.

Still, from a programmatic standpoint is there JSON equivalent? If wanted to
build something like WireViz I would think that would be the most strait
forward approach. I know there are lots of libs that compose it with mixes
classes but I rather just build json objects...

~~~
nextaccountic
I just found out that graphviz supports json as output. Check out
[https://graphviz.org/doc/info/output.html#d:json](https://graphviz.org/doc/info/output.html#d:json)

(found this here
[https://stackoverflow.com/a/51443514](https://stackoverflow.com/a/51443514))

I'm pretty sure that there's some tool out there to convert Graphviz's own
json format back to dot

Perhaps [https://github.com/jsongraph/jgf-
dot](https://github.com/jsongraph/jgf-dot) do it

And if not, [https://codefreezr.github.io/awesome-graphviz/#generators-
an...](https://codefreezr.github.io/awesome-graphviz/#generators-and-
translators) might contain something useful

~~~
rudolph9
Cool! Can you use the json as input?

~~~
nextaccountic
I suppose [https://github.com/jsongraph/jgf-
dot](https://github.com/jsongraph/jgf-dot) does exactly that, but not exactly
with Graphviz's own json syntax, but using this spec:

[https://github.com/jsongraph/json-graph-
specification](https://github.com/jsongraph/json-graph-specification)

------
osamagirl69
Useful looking tool, I was gearing up for drawing a schematic with about 1000
nets at work tomorrow for a cable harness so this is perfect timing...

------
myself248
This is super cool! Pinouts and wire colors are only part of a harness,
though. Other things I care about:

Branch lengths and locations, where individual connectors branch off the main
trunk of the harness.

Terminal types, because a single connector sometimes has different terminals
per pin position, or per wire type, or other requirements.

Custom wire colors and gauges; multiconductor cables aren't always all the
same gauge.

Inline splices (these may be implementable as a special case of a connector
where most wires just pass through and just a few join on one "pin"?).

Is there a WYSIWYG or live-updating editor so you can see the result as you
edit the markup? I understand why it's written that way, but it'd be a lot of
work to translate certain harnesses to be expressed that way.

~~~
maddyboo
When I edit graphviz, I usually watch my source file(s) with reflex [1] to re-
generate the output image, and use an image viewer with auto-reloading support
like sxiv [2]. Works really well for me!

1: [https://github.com/cespare/reflex](https://github.com/cespare/reflex)

2: [https://github.com/muennich/sxiv](https://github.com/muennich/sxiv)

------
armagon
That's amazing.

I don't think I've ever seen diagrams like these from GraphViz. I've spent the
last couple of days trying to structure some complicated data for it to format
to nicely, and I can't make it sing or dance nearly as well.

------
davefol
This is awesome. Just did a big harness’s at work and this would have saved a
ton of time. Import from csv or excel would be a killer feature imo

~~~
mNovak
seconded on csv import!

------
eggfriedrice
This is really cool. It's something I find hard to document at the moment so
I'll try this out with my next project.

------
jcims
This is cool. Working on a small project with lots of sensors and associated
amps/adcs/etc the wiring quickly gets out of control if you're just using
breadboards. This will help keep things documented and surface the actual
layout to help build dedicated connectors/cables.

------
smartscience
Could this also incorporate a library of common connector designs, to be
included in the generated documents? Often it can be difficult to work out the
numbering when they're very small on the real connectors.

------
mrg2k8
It would be of tremendous help if you could also use it for optical fiber
buffers. Does anyone know if it's possible, if it's on the roadmap or if
there's another FOSS tool that can do this? Thanks.

------
craftinator
I was looking for something like this for so long, I started writing my own.
This is an awesome program, thank you for releasing it publicly!

------
Multicomp
this is excellent, next time I'm at my amusement park job working on the
analog PBX system, I will definitely use this in order to document the punch
Downs and other wire cable runs from the analog phones to the voice gateways.

------
chuchurocka
This is great. For wiring audio studios patchbays I can see this coming in
handy.

------
vorpalhex
This is amazing! Love that it's text based and the output looks great.

------
mNovak
Super cool!

Would love to see pdf export for standalone documentation generation

------
jbverschoor
That looks super good

------
transistor-man
Really interesting, thanks for posting.

