Add syntax highlighting to readme's
This commit is contained in:
parent
07fa0e2ee2
commit
37f0f8b408
@ -30,6 +30,7 @@ _Note_: WireViz is not designed to represent the complete wiring of a system. It
|
|||||||
|
|
||||||
[WireViz input file](examples/demo01.yml):
|
[WireViz input file](examples/demo01.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1:
|
X1:
|
||||||
type: D-Sub
|
type: D-Sub
|
||||||
@ -56,6 +57,7 @@ _Note_: WireViz is not designed to represent the complete wiring of a system. It
|
|||||||
-
|
-
|
||||||
- X1: 5
|
- X1: 5
|
||||||
- W1: s
|
- W1: s
|
||||||
|
```
|
||||||
|
|
||||||
Output file:
|
Output file:
|
||||||
|
|
||||||
|
|||||||
@ -33,12 +33,14 @@ if tutorials:
|
|||||||
|
|
||||||
with open(os.path.abspath('../tutorial/tutorial{:02d}.md'.format(i)), 'r') as info:
|
with open(os.path.abspath('../tutorial/tutorial{:02d}.md'.format(i)), 'r') as info:
|
||||||
for line in info:
|
for line in info:
|
||||||
file.write('{}'.format(line))
|
file.write(line)
|
||||||
file.write('\n[Source](tutorial{:02d}.yml):\n\n'.format(i))
|
file.write('\n[Source](tutorial{:02d}.yml):\n\n'.format(i))
|
||||||
|
|
||||||
with open(os.path.abspath('../tutorial/tutorial{:02d}.yml'.format(i)), 'r') as src:
|
with open(os.path.abspath('../tutorial/tutorial{:02d}.yml'.format(i)), 'r') as src:
|
||||||
|
file.write('```yaml\n')
|
||||||
for line in src:
|
for line in src:
|
||||||
file.write(' {}'.format(line))
|
file.write(line)
|
||||||
|
file.write('```\n')
|
||||||
file.write('\n')
|
file.write('\n')
|
||||||
|
|
||||||
file.write('\nOutput:\n\n'.format(i))
|
file.write('\nOutput:\n\n'.format(i))
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
[Source](tutorial01.yml):
|
[Source](tutorial01.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1:
|
X1:
|
||||||
pincount: 4
|
pincount: 4
|
||||||
@ -22,6 +23,7 @@
|
|||||||
- X1: [1-4]
|
- X1: [1-4]
|
||||||
- W1: [1-4]
|
- W1: [1-4]
|
||||||
- X2: [1-4]
|
- X2: [1-4]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -36,6 +38,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial02.yml):
|
[Source](tutorial02.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1:
|
X1:
|
||||||
pincount: 4
|
pincount: 4
|
||||||
@ -62,6 +65,7 @@ Output:
|
|||||||
- W1: [1-4]
|
- W1: [1-4]
|
||||||
# non-sequential wiring:
|
# non-sequential wiring:
|
||||||
- X2: [1,2,4,3]
|
- X2: [1,2,4,3]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -78,6 +82,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial03.yml):
|
[Source](tutorial03.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1: &template1 # define a template for later use
|
X1: &template1 # define a template for later use
|
||||||
pinout: [GND, VCC, RX, TX] # pincount implicit in pinout
|
pinout: [GND, VCC, RX, TX] # pincount implicit in pinout
|
||||||
@ -103,6 +108,7 @@ Output:
|
|||||||
- # connect the shielding to a pin
|
- # connect the shielding to a pin
|
||||||
- X1: 1
|
- X1: 1
|
||||||
- W1: s
|
- W1: s
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -117,6 +123,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial04.yml):
|
[Source](tutorial04.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1: &template_con
|
X1: &template_con
|
||||||
pinout: [GND, VCC, SCL, SDA]
|
pinout: [GND, VCC, SCL, SDA]
|
||||||
@ -151,6 +158,7 @@ Output:
|
|||||||
- X2: [1-4]
|
- X2: [1-4]
|
||||||
- W2: [1-4]
|
- W2: [1-4]
|
||||||
- X3: [1-4]
|
- X3: [1-4]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -168,6 +176,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial05.yml):
|
[Source](tutorial05.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1:
|
X1:
|
||||||
pinout: [+12V, GND, GND, +5V]
|
pinout: [+12V, GND, GND, +5V]
|
||||||
@ -195,6 +204,7 @@ Output:
|
|||||||
- # attach connectors (separetely from ferrules)
|
- # attach connectors (separetely from ferrules)
|
||||||
- W1: [1-4]
|
- W1: [1-4]
|
||||||
- X1: [1-4]
|
- X1: [1-4]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -208,6 +218,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial06.yml):
|
[Source](tutorial06.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1:
|
X1:
|
||||||
pinout: [+12V, GND, GND, +5V]
|
pinout: [+12V, GND, GND, +5V]
|
||||||
@ -246,6 +257,7 @@ Output:
|
|||||||
-
|
-
|
||||||
- F_10_1: 1
|
- F_10_1: 1
|
||||||
- W1: 3
|
- W1: 3
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
@ -258,6 +270,7 @@ Output:
|
|||||||
|
|
||||||
[Source](tutorial07.yml):
|
[Source](tutorial07.yml):
|
||||||
|
|
||||||
|
```yaml
|
||||||
connectors:
|
connectors:
|
||||||
X1: &template_con
|
X1: &template_con
|
||||||
type: Molex KK 254
|
type: Molex KK 254
|
||||||
@ -310,6 +323,7 @@ Output:
|
|||||||
- X5: [1-4]
|
- X5: [1-4]
|
||||||
- W5: [1-4]
|
- W5: [1-4]
|
||||||
- X6: [1-4]
|
- X6: [1-4]
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
Output:
|
Output:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user