From cfe9590905a62892c57560562b9fac3e36de4002 Mon Sep 17 00:00:00 2001 From: Tobias Falk Date: Wed, 12 Mar 2025 22:15:35 +0100 Subject: [PATCH] Add Readme text and examples --- docs/README.md | 5 +++++ examples/demo01.yml | 2 ++ examples/ex15.yml | 46 +++++++++++++++++++++++++++++++++++++++++++++ examples/ex16.yml | 0 4 files changed, 53 insertions(+) create mode 100644 examples/ex15.yml create mode 100644 examples/ex16.yml diff --git a/docs/README.md b/docs/README.md index 5e14600..759c946 100644 --- a/docs/README.md +++ b/docs/README.md @@ -148,6 +148,11 @@ To see how to specify the output formats, as well as additional options, run: $ wireviz --help ``` +For using the .gv output one needs to use the following command: + +``` +dot .gv | gvpr -q -cf _pin2pin.gvpr | neato -n2 -T -o . +``` ### (Re-)Building the example projects diff --git a/examples/demo01.yml b/examples/demo01.yml index b44cb54..aed5079 100644 --- a/examples/demo01.yml +++ b/examples/demo01.yml @@ -6,6 +6,8 @@ connectors: type: D-Sub subtype: female pinlabels: [DCD, RX, TX, DTR, GND, DSR, RTS, CTS, RI] + loops: + L1: [7,8] X2: type: Molex KK 254 subtype: female diff --git a/examples/ex15.yml b/examples/ex15.yml new file mode 100644 index 0000000..0e90e2e --- /dev/null +++ b/examples/ex15.yml @@ -0,0 +1,46 @@ +connectors: # This is based on ex1 and adds some Shorts to the connectors + X1: # An example of Shorts with more information + type: Molex KK 254 + subtype: female + pinlabels: [GND, VCC, RX, TX, GND, VCC, GND] + shorts: # A List(Dict) of shorts is created + SH1: [1, 5, 7] # First is the designator than a list of pins to be shorted + SH2: [2, 6] + additional_components: # Some Additional Components to describe the short in more detail + - references: SH1 + color: PK # The color of the short, can also be multicolor + manufacturer: WireViz + mpn: 42XCD42A5 + type: shortPartA + amount: 42 mm # The length or some other quantity + - references: SH2 + color: RD + manufacturer: WireViz + mpn: 42XCD42A5 + type: shortPartB + X2: # An example of a simple short definition + type: Molex KK 254 + subtype: female + pinlabels: [GND, VCC, RX, TX, GND, VCC, GND] + shorts: # The definition is the same as above but there is no additional_components for more information + SH1: [1, 5, 7] + SH2: [2, 6] + +cables: + W1: + color_code: TEL + wirecount: 4 + gauge: 0.25 mm2 + show_equiv: true + length: 0.2 + shield: true + type: Serial + +connections: + - + - X1: [1-4] + - W1: [1-4] + - X2: [1,2,4,3] + - + - X1: 1 + - W1: s \ No newline at end of file diff --git a/examples/ex16.yml b/examples/ex16.yml new file mode 100644 index 0000000..e69de29