Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Allow include files in yml #274

Closed
Halfwalker opened this issue Feb 9, 2022 · 2 comments
Closed

[feature] Allow include files in yml #274

Halfwalker opened this issue Feb 9, 2022 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@Halfwalker
Copy link

I'm playing with WireViz to see if I can use it to document an automotive wiring harness. This is a fairly complex beast, with several large-pin-count connectors - 26, 34, 38, 20, etc. plus a ton of smaller ones. I think trying to do them all, the whole harness, in a single image will just get too unwieldy. So perhaps doing sub-portions of the harness ?

For example, the in-cabin portion of the harness will have ECU_A (24pins), ECU_B (36 pins), II1 (38 pins), IJ1 (20 pins) connectors. There are about 20 wires that go between these 4, so do a run that just diagrams those connections and associated pins, hiding unused pins. Another would be between II1, IJ1, EA1, EA2, so another run for just those connections and the associated pins. I can see doing 5 or 6 sub-portions like that.

The problem is that each yml file will need to contain the same connectors, and keeping them in sync is an easily overlooked place for errors. It would be nice to define the connectors each in their own file, then include them in the connectors: section as needed for each sub-portion yml file.

connectors:
  ECU_A:
    src: ECU_A.yml
  ECU_B:
    src: ECU_B.yml
  :

I know we can simulate this using a Makefile to assemble the sub-portion run yml files, but it would be cleaner this way I think.

@kvid
Copy link
Collaborator

kvid commented Feb 9, 2022

This seems related to #220. Please try including your library of connector and cable templates as a YAML input file using the existing command line option --prepend-file. See also syntax and tutorial for using such templates. Does that solve your issue? If not, please describe use cases where more or different features are required, but please consider doing that by joining the discussion at #220 unless you feel that issue differs too much from your issue.

@Halfwalker
Copy link
Author

Damn, I should have read through the others. #220 would cover it. --prepend-file can be made to work, but would be a little on the ugly side.

@kvid kvid added the duplicate This issue or pull request already exists label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants