Merge 6a5b51f303752f65a5aa25e5d68b7ffc0125f005 into e4fe099f8c7b86736aee7b4227cc794b6e8b36f0

This commit is contained in:
Martin Rieder 2025-02-17 23:19:02 +00:00 committed by GitHub
commit 3c3aba768b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 291 additions and 196 deletions

View File

@ -13,17 +13,64 @@ WireViz is a tool for easily documenting cables, wiring harnesses and connector
## Features ## Features
* WireViz input files are fully text based * WireViz input files contain fully text based [YAML syntax](syntax.md)
* No special editor required * No special editor required
* Human readable * Human readable
* Easy version control * Easy version control
* YAML syntax * UTF-8 special character support
* 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, ...) * Understands and uses color abbreviations as per [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) (black=BK, red=RD, ...)
![##000000](https://via.placeholder.com/15/000000/ffffff?text=BK)
![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=WH)
![##999999](https://via.placeholder.com/15/999999/000000?text=GY)
![##ff66cc](https://via.placeholder.com/15/ff66cc/000000?text=PK)
![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=RD)
![##ff8000](https://via.placeholder.com/15/ff8000/000000?text=OG)
![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=YE)
![##708000](https://via.placeholder.com/15/708000/000000?text=OL)
![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=GN)
![##00ffff](https://via.placeholder.com/15/00ffff/000000?text=TQ)
![##a0dfff](https://via.placeholder.com/15/a0dfff/000000?text=LB)
![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=BU)
![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=VT)
![##895956](https://via.placeholder.com/15/895956/000000?text=BN)
![##ceb673](https://via.placeholder.com/15/ceb673/000000?text=BG)
![##f5f0d0](https://via.placeholder.com/15/f5f0d0/000000?text=IV)
![##708090](https://via.placeholder.com/15/708090/000000?text=SL)
![##d6775e](https://via.placeholder.com/15/d6775e/000000?text=CU)
![##aaaaaa](https://via.placeholder.com/15/aaaaaa/000000?text=SN)
![##84878c](https://via.placeholder.com/15/84878c/000000?text=SR)
![##ffcf80](https://via.placeholder.com/15/ffcf80/000000?text=GD)
<!-- * 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) --> <!-- * 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 * 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/...) * [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/...)
![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=WT)
![##895956](https://via.placeholder.com/15/895956/000000?text=BN)
![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=GN)
![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=YE)
![##999999](https://via.placeholder.com/15/999999/000000?text=GY)
![##ff66cc](https://via.placeholder.com/15/ff66cc/000000?text=PK)
![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=BU)
![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=RD)
![##000000](https://via.placeholder.com/15/000000/ffffff?text=BK)
![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=VT)
* [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system)
(BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
![##895956](https://via.placeholder.com/15/895956/000000?text=BN)
![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=RD)
![##ff8000](https://via.placeholder.com/15/ff8000/000000?text=OR)
![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=YE)
![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=GN)
![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=BU)
![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=VT)
![##999999](https://via.placeholder.com/15/999999/000000?text=GY)
![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=WT)
![##000000](https://via.placeholder.com/15/000000/ffffff?text=BK)
* [25 Pair Color Code](https://en.wikipedia.org/wiki/25-pair_color_code#Color_coding) (BUWH/WHBU/OGWH/WHOG/GNWH/WHGN/BNWH/...) * [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/...) * [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 * Understands wire gauge in mm² or AWG

View File

@ -1,152 +1,183 @@
# WireViz Syntax # WireViz Syntax
WireViz input files are created as plain text based on YAML, which does not require any special editor. International character sets and technical symbols are also supported through UTF-8.
See the following sections of this document about further details:
- **[Main sections](#main-sections)**
- [Colors](#colors)
- [Cable color codes](#cable-color-codes)
- [Images](#images)
- [Multiline Strings](#multiline-strings)
- [Inheritance](#inheritance)
The YAML syntax is human readable and supports version control because of its hierarchical structure.
The input files would normally be saved using a text editor to the file extension `.yml` or `.yaml`.
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.
## Main sections ## Main sections
The main sections at the highest hierarchical level of the document may contain any of the following:
- [Connectors](#connector-attributes)
- [Cables](#cable-attributes)
- [Connections](#connection-sets)
- [Metadata](#metadata-entries)
- [Options](#options)
- [BOM items and additional components](#bom-items-and-additional-components)
- [GraphViz tweaking](#graphviz-tweaking-experimental)
Their respective attribute assignments need to be indented using space characters on every line.
Make sure they are aligned correctly in the document hierarchy, i.e. by two spaces for each level!
```yaml ```yaml
connectors: # dictionary of all used connectors connectors: # dictionary of all used connectors
<str> : # unique connector designator/name <str>: # unique connector designator/name
... # connector attributes (see below) <str>: <...> # connector attributes (see below)
<str> : <str>:
... <str>: <...>
... <...>
cables: # dictionary of all used cables and wires cables: # dictionary of all used cables and wires
<str> : # unique cable designator/name <str>: # unique cable designator/name
... # cable attributes (see below) <str>: <...> # cable attributes (see below)
<str> : <str>:
... <str>: <...>
... <...>
connections: # list of all connections to be made connections: # list of all connection sets (see below)
# between cables and connectors
- -
... # connection set (see below) - <...> # <connector> or <cable>
- <...> # <cable> or <connector>
- -
... - <...>
... <...>
additional_bom_items: # custom items to add to BOM additional_bom_items: # custom items to add to BOM
- <bom-item> # BOM item (see below) - <bom-item> # BOM item (see below)
... <str>: <...>
metadata: # dictionary of meta-information describing the harness metadata: # dictionary of meta-information describing the harness
<key> : <value> # any number of key value pairs (see below) <key>: <value> # any number of key value pairs (see below)
... <...>
options: # dictionary of common attributes for the whole harness options: # dictionary of common attributes for the whole harness
<str> : <value> # optional harness attributes (see below) <str>: <value> # optional harness attributes (see below)
... <...>
tweak: # optional tweaking of .gv output tweak: # optional tweaking of .gv output
... <...>
``` ```
## Connector attributes ## Connector attributes
```yaml ```yaml
<str> : # unique connector designator/name connectors:
# general information about a connector (all optional) <str>: # unique connector designator/name
type: <str> # general information about a connector (all optional)
subtype: <str> type: <str>
color: <color> # see below subtype: <str>
image: <image> # see below color: <color> # see below
notes: <str> image: <image> # see below
notes: <str>
# product information (all optional) # product information (all optional)
ignore_in_bom: <bool> # if set to true the connector is not added to the BOM ignore_in_bom: <bool> # if set to true the connector is not added to the BOM
pn: <str> # [internal] part number pn: <str> # [internal] part number
manufacturer: <str> # manufacturer name manufacturer: <str> # manufacturer name
mpn: <str> # manufacturer part number mpn: <str> # manufacturer part number
supplier: <str> # supplier name supplier: <str> # supplier name
spn: <str> # supplier part number spn: <str> # supplier part number
additional_components: # additional components additional_components: # additional components
- <additional-component> # additional component (see below) - <additional-component> # additional component (see below)
# pinout information # pinout information
# at least one of the following must be specified # at least one of the following must be specified
pincount: <int> # if omitted, is set to length of specified list(s) pincount: <int> # if omitted, is set to length of specified list(s)
pins: <List> # if omitted, is autofilled with [1, 2, ..., pincount] pins: <List> # if omitted, is autofilled with [1, 2, ..., pincount]
pinlabels: <List> # if omitted, is autofilled with blanks pinlabels: <List> # if omitted, is autofilled with blanks
# pin color marks (optional) # pin color marks (optional)
pincolors: <List> # list of colors to be assigned to the respective pins; pincolors: <List> # list of colors to be assigned to the respective pins;
# if list length is lower than connector pinout, # if list length is lower than connector pinout,
# no color marks will be added to remaining pins # no color marks will be added to remaining pins
# rendering information (all optional) # rendering information (all optional)
bgcolor: <color> # Background color of diagram connector box bgcolor: <color> # Background color of diagram connector box
bgcolor_title: <color> # Background color of title in diagram connector box bgcolor_title: <color> # Background color of title in diagram connector box
style: <style> # may be set to simple for single pin connectors style: <style> # may be set to simple for single pin connectors
show_name: <bool> # defaults to true for regular connectors, show_name: <bool> # defaults to true for regular connectors,
# false for simple connectors # false for simple connectors
show_pincount: <bool> # defaults to true for regular connectors show_pincount: <bool> # defaults to true for regular connectors
# false for simple connectors # false for simple connectors
hide_disconnected_pins: <bool> # defaults to false hide_disconnected_pins: <bool> # defaults to false
# loops # loops
loops: <List> # every list item is itself a list of exactly two pins loops: <List> # every list item is itself a list of exactly two pins
# on the connector that are to be shorted # on the connector that are to be shorted
``` ```
## Cable attributes ## Cable attributes
```yaml ```yaml
<str> : # unique cable designator/name cables:
# general information about a connector (all optional) <str>: # unique cable designator/name
category: <category> # may be set to bundle; # general information about a connector (all optional)
# generates one BOM item for every wire in the bundle category: <category> # may be set to bundle;
# instead of a single item for the entire cable; # generates one BOM item for every wire in the bundle
# renders with a dashed outline # instead of a single item for the entire cable;
type: <str> # renders with a dashed outline
gauge: <int/float/str> # allowed formats: type: <str>
# <int/float> mm2 is understood gauge: <int/float/str> # allowed formats:
# <int> AWG is understood # <int/float> mm2 is understood
# <int/float> is assumed to be mm2 # <int> AWG is understood
# <str> custom units and formats are allowed # <int/float> is assumed to be mm2
# but unavailable for auto-conversion # <str> custom units and formats are allowed
show_equiv: <bool> # defaults to false; can auto-convert between mm2 and AWG # but unavailable for auto-conversion
# and display the result when set to true show_equiv: <bool> # defaults to false; can auto-convert between mm2 and AWG
length: <int/float>[ <unit>] # <int/float> is assumed to be in meters unless <unit> is specified # and display the result when set to true
# e.g. length: 2.5 -> assumed to be 2.5 m length: <int/float>[ <unit>] # <int/float> is assumed to be in meters unless <unit> is specified
# or length: 2.5 ft -> "ft" is used as the unit # e.g. length: 2.5 -> assumed to be 2.5 m
# Units are not converted during BOM generation; # or length: 2.5 ft -> "ft" is used as the unit
# different units result in separate BOM entries. # Units are not converted during BOM generation;
shield: <bool/color> # defaults to false # different units result in separate BOM entries.
# setting to true will display the shield as a thin black line shield: <bool/color> # defaults to false
# using a color (see below) will render the shield in that color # setting to true will display the shield as a thin black line
# A shield can be accessed by using 's' as the wire ID # using a color (see below) will render the shield in that color
color: <color> # see below # A shield can be accessed by using 's' as the wire ID
image: <image> # see below color: <color> # see below
notes: <str> image: <image> # see below
notes: <str>
# product information (all optional) # product information (all optional)
ignore_in_bom: <bool> # if set to true the cable or wires are not added to the BOM ignore_in_bom: <bool> # if set to true the cable or wires are not added to the BOM
pn: <str> # [internal] part number pn: <str> # [internal] part number
manufacturer: <str> # manufacturer name manufacturer: <str> # manufacturer name
mpn: <str> # manufacturer part number mpn: <str> # manufacturer part number
supplier: <str> # supplier name supplier: <str> # supplier name
spn: <str> # supplier part number spn: <str> # supplier part number
additional_components: # additional components additional_components: # additional components
- <additional-component> # additional component (see below) - <additional-component> # additional component (see below)
# conductor information # conductor information
# the following combinations are permitted: # the following combinations are permitted:
# wirecount only no color information is specified # wirecount only no color information is specified
# colors only wirecount is inferred from list length # colors only wirecount is inferred from list length
# wirecount + color_code colors are auto-generated based on the specified # wirecount + color_code colors are auto-generated based on the specified
# color code (see below) to match the wirecount # color code (see below) to match the wirecount
# wirecount + colors colors list is trimmed or repeated to match the wirecount # wirecount + colors colors list is trimmed or repeated to match the wirecount
wirecount: <int> wirecount: <int>
colors: <List> # list of colors (see below) colors: <List> # list of colors (see below)
color_code: <str> # one of the supported cable color codes (see below) color_code: <str> # one of the supported cable color codes (see below)
wirelabels: <List> # optional; one label for each wire wirelabels: <List> # optional; one label for each wire
# rendering information (all optional) # rendering information (all optional)
bgcolor: <color> # Background color of diagram cable box bgcolor: <color> # Background color of diagram cable box
bgcolor_title: <color> # Background color of title in diagram cable box bgcolor_title: <color> # Background color of title in diagram cable box
show_name: <bool> # defaults to true show_name: <bool> # defaults to true
show_wirecount: <bool> # defaults to true show_wirecount: <bool> # defaults to true
show_wirenumbers: <bool> # defaults to true for cables; false for bundles show_wirenumbers: <bool> # defaults to true for cables; false for bundles
``` ```
@ -154,13 +185,22 @@ tweak: # optional tweaking of .gv output
A connection set is used to connect multiple components together. Multiple connections can be easily created in parallel within one connection set, by specifying a list of individual pins (for `connectors`) or wires (for `cables`) for every component along the way. A connection set is used to connect multiple components together. Multiple connections can be easily created in parallel within one connection set, by specifying a list of individual pins (for `connectors`) or wires (for `cables`) for every component along the way.
- Each connection set is a list of components.
- The minimum number of items is one.
- The maximum number of items is unlimited.
- Items must alternatingly belong to the `connectors` and the `cables` sections.
- When a connection set defines multiple parallel connections, the number of specified `<pin>`s and `<wire>`s for each component in the set must match. When specifying only one designator, one is auto-generated for each connection of the set.
- `<pin>` may reference a pin's unique ID (as per the connector's `pins` attribute, auto-numbered from 1 by default) or its label (as per `pinlabels`).
- `<wire>` may reference a wire's number within a cable/bundle, its label (as per `wirelabels`) or, if unambiguous, its color.
- For `<arrow>`, see below.
```yaml ```yaml
connections: connections:
- # Each list entry is a connection set - # Each list entry is a connection set
- <component> # Each connection set is itself a list of items - <component> # Each connection set is itself a list of items
- <component> # Items must alternatingly belong to the connectors and cables sections - <component> # Items must alternatingly belong to the connectors and cables sections
# Arrows may be used instead of cables # Arrows may be used instead of cables
-... - <...>
- # example (single connection) - # example (single connection)
- <connector>: <pin> # attach one pin of the connector - <connector>: <pin> # attach one pin of the connector
@ -188,18 +228,9 @@ connections:
# use double line arrow (==, <==, <==>, ==>) # use double line arrow (==, <==, <==>, ==>)
- <connector> - <connector>
... <...>
``` ```
- Each connection set is a list of components.
- The minimum number of items is one.
- The maximum number of items is unlimited.
- Items must alternatingly belong to the `connectors` and the `cables` sections.
- When a connection set defines multiple parallel connections, the number of specified `<pin>`s and `<wire>`s for each component in the set must match. When specifying only one designator, one is auto-generated for each connection of the set.
- `<pin>` may reference a pin's unique ID (as per the connector's `pins` attribute, auto-numbered from 1 by default) or its label (as per `pinlabels`).
- `<wire>` may reference a wire's number within a cable/bundle, its label (as per `wirelabels`) or, if unambiguous, its color.
- For `<arrow>`, see below.
### Single connections ### Single connections
#### Connectors #### Connectors
@ -265,7 +296,7 @@ connections:
- <arrow> # ==, <==, <==> or ==> - <arrow> # ==, <==, <==> or ==>
- <connector> - <connector>
- -
- ... - <...>
- <connector>: [<pin>, ...] # designator and pinlist (pinlist is ignored) - <connector>: [<pin>, ...] # designator and pinlist (pinlist is ignored)
# useful when combining arrows and wires # useful when combining arrows and wires
- <arrow> # ==, <==, <==> or ==> - <arrow> # ==, <==, <==> or ==>
@ -279,7 +310,7 @@ If multiple identical copies of a connector or cable are needed, it is possible
Autogenerated instances of components can be explicitly assigned a designator; this way, they can be referenced in multiple connection sets. However, it is also possible to generate unnamed instances of components. This is especially useful for components that do not need to be referenced in more than one connection set, and where naming each individual instance is an unnecessary complication. Autogenerated instances of components can be explicitly assigned a designator; this way, they can be referenced in multiple connection sets. However, it is also possible to generate unnamed instances of components. This is especially useful for components that do not need to be referenced in more than one connection set, and where naming each individual instance is an unnecessary complication.
Example (see `connections` section): Example (see [`connections`](#connection-sets) section):
```yaml ```yaml
connectors: connectors:
@ -331,7 +362,7 @@ Even if a component is not connected to any other components, it must be mention
```yaml ```yaml
connectors: connectors:
X1: # this connector will not be connected to any other components X1: # this connector will not be connected to any other components
... <...>
connections: connections:
- -
@ -345,7 +376,7 @@ If any component is defined in the `connectors` or `cables` sections but not ref
## Metadata entries ## Metadata entries
```yaml ```yaml
# Meta-information describing the harness metadata: # Meta-information describing the harness
# Each key/value pair replaces all key references in # Each key/value pair replaces all key references in
# the HTML output template with the belonging value. # the HTML output template with the belonging value.
@ -360,8 +391,8 @@ See [HTML Output Templates](../src/wireviz/templates/) for how metadata entries
## Options ## Options
```yaml ```yaml
# Common attributes for the whole harness. options: # Common attributes for the whole harness.
# All entries are optional and have default values. # All entries are optional and have default values.
# Background color of diagram and HTML output # Background color of diagram and HTML output
bgcolor: <color> # Default = 'WH' bgcolor: <color> # Default = 'WH'
@ -398,73 +429,71 @@ See [HTML Output Templates](../src/wireviz/templates/) for how metadata entries
## BOM items and additional components ## BOM items and additional components
Connectors (both regular, and auto-generated), cables, and wires of a bundle are automatically added to the BOM, Connectors (both regular, and auto-generated), cables, and wires of a bundle are automatically added to the BOM, unless the `ignore_in_bom` attribute is set to `true`.
unless the `ignore_in_bom` attribute is set to `true`.
Additional items can be added to the BOM as either part of a connector or cable or on their own. Additional items can be added to the BOM as either part of a connector or cable or on their own.
Parts can be added to a connector or cable in the section `<additional-component>` which will also list them in the graph. Parts can be added to a connector or cable in the section `<additional-component>` which will also list them in the graph.
```yaml ```yaml
- additional_components:
type: <str> # type of additional component -
# all the following are optional: type: <str> # type of additional component
subtype: <str> # additional description (only shown in bom) # all the following are optional:
qty: <int/float> # qty to add to the bom (defaults to 1) subtype: <str> # additional description (only shown in bom)
qty_multiplier: <str> # multiplies qty by a feature of the parent component qty: <int/float> # qty to add to the bom (defaults to 1)
# when used in a connector: qty_multiplier: <str> # multiplies qty by a feature of the parent component
# pincount number of pins of connector # when used in a connector:
# populated number of populated positions in a connector # pincount number of pins of connector
# unpopulated number of unpopulated positions # populated number of populated positions in a connector
# when used in a cable: # unpopulated number of unpopulated positions
# wirecount number of wires of cable/bundle # when used in a cable:
# terminations number of terminations on a cable/bundle # wirecount number of wires of cable/bundle
# length length of cable/bundle # terminations number of terminations on a cable/bundle
# total_length sum of lengths of each wire in the bundle # length length of cable/bundle
unit: <str> # total_length sum of lengths of each wire in the bundle
pn: <str> # [internal] part number unit: <str>
manufacturer: <str> # manufacturer name pn: <str> # [internal] part number
mpn: <str> # manufacturer part number manufacturer: <str> # manufacturer name
supplier: <str> # supplier name mpn: <str> # manufacturer part number
spn: <str> # supplier part number supplier: <str> # supplier name
bgcolor: <color> # Background color of entry in diagram component box spn: <str> # supplier part number
bgcolor: <color> # Background color of entry in diagram component box
``` ```
Alternatively items can be added to just the BOM by putting them in the section `<bom-item>` above. Alternatively items can be added to just the BOM by putting them in the section `<bom-item>` above.
```yaml ```yaml
- additional_bom_items:
description: <str> -
# all the following are optional: description: <str>
qty: <int/float> # qty to add to the bom (defaults to 1) # all the following are optional:
unit: <str> qty: <int/float> # qty to add to the bom (defaults to 1)
designators: <List> unit: <str>
pn: <str> # [internal] part number designators: <List>
manufacturer: <str> # manufacturer name pn: <str> # [internal] part number
mpn: <str> # manufacturer part number manufacturer: <str> # manufacturer name
supplier: <str> # supplier name mpn: <str> # manufacturer part number
spn: <str> # supplier part number supplier: <str> # supplier name
spn: <str> # supplier part number
``` ```
## GraphViz tweaking (experimental) ## GraphViz tweaking (experimental)
This feature is experimental and might change or be removed in future versions.
```yaml ```yaml
# Optional tweaking of the .gv output. tweak: # Optional tweaking of the .gv output.
# This feature is experimental and might change
# or be removed in future versions.
override: # dict of .gv entries to override override: # dict of .gv entries to override
# Each entry is identified by its leading string # Each entry is identified by its leading string in lines beginning with a TAB character.
# in lines beginning with a TAB character. # The leading string might be in "quotes" in the .gv output. This leading string must be
# The leading string might be in "quotes" in
# the .gv output. This leading string must be
# followed by attributes in [square brackets]. # followed by attributes in [square brackets].
# Entries with an attribute containing HTML are # Entries with an attribute containing HTML are not supported.
# not supported.
<str>: # leading string of .gv entry <str>: # leading string of .gv entry
<str> : <str/null> # attribute and its new value <str>: <str/null> # attribute and its new value
# Any number of attributes can be overridden # Any number of attributes can be overridden for each entry.
# for each entry. Attributes not already existing # Attributes not already existing in the entry will be appended to the entry.
# in the entry will be appended to the entry.
# Use null as new value to delete an attribute. # Use null as new value to delete an attribute.
append: <str/list> # string or list of strings to append to the .gv output append: <str/list> # string or list of strings to append to the .gv output
@ -472,10 +501,7 @@ Alternatively items can be added to just the BOM by putting them in the section
## Colors ## Colors
Colors are defined via uppercase, two character strings. Colors are defined via uppercase, two character strings. The following colors are understood:
Striped/banded wires can be specified by simply concatenating multiple colors, with no space inbetween, eg. `GNYE` for green-yellow.
The following colors are understood:
- `BK` ![##000000](https://via.placeholder.com/15/000000/000000?text=+) (black) - `BK` ![##000000](https://via.placeholder.com/15/000000/000000?text=+) (black)
- `WH` ![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=+) (white) - `WH` ![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=+) (white)
@ -502,20 +528,42 @@ The following colors are understood:
<!-- color list generated with a helper script: --> <!-- color list generated with a helper script: -->
<!-- https://gist.github.com/formatc1702/3c93fb4c5e392364899283f78672b952 --> <!-- https://gist.github.com/formatc1702/3c93fb4c5e392364899283f78672b952 -->
Striped/banded wires can be specified by simply concatenating multiple colors,
with no space inbetween, eg. `GNYE` for green-yellow.
It is also possible to specify colors as hexadecimal RGB values, e.g. `#112233` or `#FFFF00:#009900`. It is also possible to specify colors as hexadecimal RGB values, e.g. `#112233` or `#FFFF00:#009900`.
Remember quoting strings containing a `#` in the YAML file. Remember quoting strings containing a `#` in the YAML file.
## Cable color codes ## Cable color codes
Supported color codes: Supported values for different international color coding standards are:
- `DIN` for [DIN 47100](https://en.wikipedia.org/wiki/DIN_47100) - `DIN` for [DIN 47100](https://en.wikipedia.org/wiki/DIN_47100) (WT/BN/GN/YE/GY/PK/BU/RD/BK/VT/...)
![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=+) ![##895956](https://via.placeholder.com/15/895956/000000?text=+) ![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=+) ![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=+) ![##999999](https://via.placeholder.com/15/999999/000000?text=+) ![##ff66cc](https://via.placeholder.com/15/ff66cc/000000?text=+) ![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=+) ![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=+) ![##000000](https://via.placeholder.com/15/000000/000000?text=+) ![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=+) ... ![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=WT)
![##895956](https://via.placeholder.com/15/895956/000000?text=BN)
![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=GN)
![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=YE)
![##999999](https://via.placeholder.com/15/999999/000000?text=GY)
![##ff66cc](https://via.placeholder.com/15/ff66cc/000000?text=PK)
![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=BU)
![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=RD)
![##000000](https://via.placeholder.com/15/000000/ffffff?text=BK)
![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=VT)
- `IEC` for [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system) ("ROY G BIV") - `IEC` for [IEC 60757](https://en.wikipedia.org/wiki/Electronic_color_code#Color_band_system)
(BN/RD/OR/YE/GN/BU/VT/GY/WT/BK/...)
![##895956](https://via.placeholder.com/15/895956/000000?text=+) ![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=+) ![##ff8000](https://via.placeholder.com/15/ff8000/000000?text=+) ![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=+) ![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=+) ![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=+) ![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=+) ![##999999](https://via.placeholder.com/15/999999/000000?text=+) ![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=+) ![##000000](https://via.placeholder.com/15/000000/000000?text=+) ... ![##895956](https://via.placeholder.com/15/895956/000000?text=BN)
![##ff0000](https://via.placeholder.com/15/ff0000/000000?text=RD)
![##ff8000](https://via.placeholder.com/15/ff8000/000000?text=OR)
![##ffff00](https://via.placeholder.com/15/ffff00/000000?text=YE)
![##00ff00](https://via.placeholder.com/15/00ff00/000000?text=GN)
![##0066ff](https://via.placeholder.com/15/0066ff/000000?text=BU)
![##8000ff](https://via.placeholder.com/15/8000ff/000000?text=VT)
![##999999](https://via.placeholder.com/15/999999/000000?text=GY)
![##ffffff](https://via.placeholder.com/15/ffffff/000000?text=WT)
![##000000](https://via.placeholder.com/15/000000/ffffff?text=BK)
- `TEL` and `TELALT` for [25-pair color code](https://en.wikipedia.org/wiki/25-pair_color_code) - `TEL` and `TELALT` for [25-pair color code](https://en.wikipedia.org/wiki/25-pair_color_code)
- `T568A` and `T568B` for [TIA/EIA-568](https://en.wikipedia.org/wiki/TIA/EIA-568#Wiring) (e.g. Ethernet) - `T568A` and `T568B` for [TIA/EIA-568](https://en.wikipedia.org/wiki/TIA/EIA-568#Wiring) (e.g. Ethernet)
@ -578,4 +626,4 @@ See [yaml-multiline.info](https://yaml-multiline.info/) for more information.
## Inheritance ## Inheritance
[YAML anchors and references](https://blog.daemonl.com/2016/02/yaml.html) are useful for defining and referencing information that is used more than once in a file, e.g. when using defining multiple connectors of the same type or family. See [Demo 02](../examples/demo02.yml) for an example. [YAML anchors and references](https://blog.daemonl.com/2016/02/yaml.html) are useful for defining and referencing information that is used more than once in a file, e.g. when using multiple connectors of the same type or family. See [Demo 02](../examples/demo02.yml) for an example.