Skip to content

Commit

Permalink
Add WireViz syntax documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
formatc1702 committed Jul 20, 2020
1 parent a418005 commit d7c3e6b
Showing 1 changed file with 93 additions and 0 deletions.
93 changes: 93 additions & 0 deletions syntax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# WireViz Syntax

## Main sections

```yaml
connectors: # dictionary of all used connectors
X1: # unique connector designator/name
... # connector attributes (see below)
X2:
...
...

cables: # dictionary of all used cables and wires
W1: # unique cable designator/name
... # cable attributes (see below)
W2:
...
...

connections: # list of all connections to be made
# between cables and connectors
-
... # connection set (see below)
-
...
```
## Connector attributes
```yaml
X1:
# general information about a connector (all optional)
type: <string>
subtype: <string>
color: <colorcode>
notes: <string>

# pinout information
# at least one of the following must be specified
pincount: <int> # if omitted, is set to length of specified list(s)
pins: <List> # if omitted, is autofilled with [1, 2, ..., pincount]
pinlabels: <List> # if omitted, is autofilled with blanks

# product information (all optional)
manufacturer: <string>
manufacturer_part_number: <string>
internel_part_number: <string>

# rendering information
style: <style> # optional; may be set to simple for single pin connectors
show_name: <bool> # optional; defaults to true for regular connectors,
# false for simple connectors
show_pincount: <bool> # opional; defaults to true for regular connectors
# false for simple connectors
hide_disconnected_pins: <bool> # optional; defaults to false

# loops and shorts
loops: <List> # TODO

# auto-generation
autogenerate: <bool> # optional; defaults to false; see below

```

### Auto-generation of connectors

<!-- TODO -->

## Cable attributes

<!-- TODO -->

## Connection sets

<!-- TODO -->

## Color codes

A color code is an uppercase, two character string.

```
TODO: list valid colors
```

## Multiline strings

Accepted in the following fields:
<!-- TODO -->

How to use
<!-- TODO -->

Link to [yaml-multiline.info](https://yaml-multiline.info/)

0 comments on commit d7c3e6b

Please sign in to comment.