WireViz icon indicating copy to clipboard operation
WireViz copied to clipboard

[feature] Use the yaml new document --- to create multiple outputs with a single input.

Open EvilMustacheTwirl opened this issue 2 years ago • 2 comments

It would be great to be able to create multiple outputs (especially for larger/messy setups) that can be easily self referenced.

Using yaml's --- to tell wireviz that this is a new output but still connected and maybe adding a full document Title, Note, Legend, Filename, etc. tag similar to the metadata options would make it easier to produce cleaner looking outputs. If no filename tag is added wireviz could add an increment-er to the inputs file name.

EvilMustacheTwirl avatar Feb 07 '23 20:02 EvilMustacheTwirl

Thank you for suggesting this new feature. I've not worked much with the parsing part of WireViz, myself, but the pyyaml library should be able to parse ---. However, I don't know how much coding is needed to obtain what you ask for. Are you motivated to give it a try creating some code for such a feature yourself? See Submitting a new Pull Request. I assume there will be some questions about how such a feature should handle certain edge cases, and this issue is the proper place to ask questions like that...

kvid avatar Mar 30 '23 19:03 kvid

Just adding the following idea here for future reference. The suggested link to "somewhere else" could be implemented across the boundaries of such a multi-document YAML file:

@kvid wrote:

An alternative use case for such a syntax (leading or trailing arrow) could be to display an arrow indicating the wire continues somewhere else (in a large diagram or in another diagram). It would probably make sense to support a text label like this:

# single wire that continues somewhere else
-
 - <-- Common signal ground
 - WIRE
 - --> Diagram B

in https://github.com/wireviz/WireViz/issues/270#issuecomment-2123078659

martinrieder avatar May 30 '24 09:05 martinrieder