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