Hacker News new | past | comments | ask | show | jobs | submit login
WireViz: Tool for documenting cables, wiring harnesses and connector pinouts (github.com/formatc1702)
228 points by sohkamyung 8 months ago | hide | past | favorite | 28 comments

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

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

Some switch to suppress drawing the box with the wire info would make this useful for simpler component interconnect diagrams. Really nice tool!

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

There are stuff that converts yaml to dot, like https://gist.github.com/rchrd2/247d1f1e86fa3749429791cf45705...

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

see also https://codefreezr.github.io/awesome-graphviz/

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...

I just found out that graphviz supports json as output. Check out https://graphviz.org/doc/info/output.html#d:json

(found this here 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 do it

And if not, https://codefreezr.github.io/awesome-graphviz/#generators-an... might contain something useful

Cool! Can you use the json as input?

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


Looks like the The dot language originated in something called [Webdot][0]

[0]: https://gitlab.com/graphviz/webdot

It's much older. https://linux.die.net/man/1/dot references papers from 1989.

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...

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.

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

2: https://github.com/muennich/sxiv

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.

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

seconded on csv import!

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.

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.

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.

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.

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!

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.

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

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

Super cool!

Would love to see pdf export for standalone documentation generation

That looks super good

Really interesting, thanks for posting.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact