# 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 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 connectors: # dictionary of all used connectors : # unique connector designator/name : <...> # connector attributes (see below) : : <...> <...> cables: # dictionary of all used cables and wires : # unique cable designator/name : <...> # cable attributes (see below) : : <...> <...> connections: # list of all connection sets (see below) - - <...> # or - <...> # or - - <...> <...> additional_bom_items: # custom items to add to BOM - # BOM item (see below) : <...> metadata: # dictionary of meta-information describing the harness : # any number of key value pairs (see below) <...> options: # dictionary of common attributes for the whole harness : # optional harness attributes (see below) <...> tweak: # optional tweaking of .gv output <...> ``` ## Connector attributes ```yaml connectors: : # unique connector designator/name # general information about a connector (all optional) type: subtype: color: # see below image: # see below notes: # product information (all optional) ignore_in_bom: # if set to true the connector is not added to the BOM pn: # [internal] part number manufacturer: # manufacturer name mpn: # manufacturer part number supplier: # supplier name spn: # supplier part number additional_components: # additional components - # additional component (see below) # pinout information # at least one of the following must be specified pincount: # if omitted, is set to length of specified list(s) pins: # if omitted, is autofilled with [1, 2, ..., pincount] pinlabels: # if omitted, is autofilled with blanks # pin color marks (optional) pincolors: # list of colors to be assigned to the respective pins; # if list length is lower than connector pinout, # no color marks will be added to remaining pins # rendering information (all optional) bgcolor: # Background color of diagram connector box bgcolor_title: # Background color of title in diagram connector box style: