diff --git a/src/batch.py b/src/batch.py
index 6b24189..300cd84 100644
--- a/src/batch.py
+++ b/src/batch.py
@@ -33,7 +33,7 @@ if tutorials:
with open(os.path.abspath('../tutorial/tutorial{:02d}.md'.format(i)), 'r') as info:
for line in info:
- file.write(line)
+ file.write(line.replace('## ', '## {} - '.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:
@@ -47,4 +47,4 @@ if tutorials:
file.write('\n\n'.format(i))
- # file.write('[Bill of Materials](tutorial{:02d}.bom.tsv)\n\n\n'.format(i))
+ file.write('[Bill of Materials](tutorial{:02d}.bom.tsv)\n\n\n'.format(i))
diff --git a/tutorial/readme.md b/tutorial/readme.md
index 31b7c70..7b01e5b 100644
--- a/tutorial/readme.md
+++ b/tutorial/readme.md
@@ -1,5 +1,5 @@
# WireViz Tutorial
-## Bare-bones example
+## 1 - Bare-bones example
* Minimum working example
* Only 1-to-1 sequential wiring
@@ -30,10 +30,13 @@ Output:

-## Adding parameters and colors
+[Bill of Materials](tutorial01.bom.tsv)
+
+
+## 2 - Adding parameters and colors
* Parameters for connectors and cables
-* Auto-calculate AWG from mm2
+* Auto-calculate equivalent AWG from mm2
* Non-sequential wiring
[Source](tutorial02.yml):
@@ -56,7 +59,7 @@ cables:
# more cable parameters:
length: 1
gauge: 0.25 mm2
- show_equiv: true
+ show_equiv: true # auto-calculate AWG equivalent
colors: [WH, BN, GN, YE]
connections:
@@ -72,7 +75,10 @@ Output:

-## Pinouts, shielding, templates (I)
+[Bill of Materials](tutorial02.bom.tsv)
+
+
+## 3 - Pinouts, shielding, templates (I)
* Connector pinouts
* Pincount implicit in pinout
@@ -115,12 +121,16 @@ Output:

-## Templates (II), notes,American standards, daisy chaining (I)
+[Bill of Materials](tutorial03.bom.tsv)
+
+
+## 4 - Templates (II), notes, American standards, daisy chaining (I)
* Overriding template parameters
-* Add nodes to connectors (and cables)
+* Add nodes to connectors and cables
* American standards: AWG gauge and IEC colors
* Linear daisy-chain
+ * Convenient for shorter chains
[Source](tutorial04.yml):
@@ -144,7 +154,7 @@ cables:
W1: &template_cbl
wirecount: 4
length: 0.3
- gauge: 24 AWG # specifying guage in AWG directly
+ gauge: 24 AWG # specify gauge in AWG directly
color_code: IEC # IEC 62 colors also supported
notes: This cable is a bit longer
W2:
@@ -168,13 +178,21 @@ Output:

-## Ferrules, wire bundles, custom wire colors
+[Bill of Materials](tutorial04.bom.tsv)
+
+
+## 5 - Ferrules, wire bundles, custom wire colors
* Ferrules
+ * Simpler than connectors
+ * Compact graphical representation
+ * Only one pin, only one connection, no designator
+ * Define once, auto-generate where needed
* Wire bundles
* Internally treated as cables
- * Different treatment in BOM
-* Custom colors
+ * Different treatment in BOM: Each wire is listed individually
+ * Represented with dashed outline
+* Custom wire colors
* Wirecount can be implicit in color list
[Source](tutorial05.yml):
@@ -196,12 +214,12 @@ cables:
W1:
category: bundle # bundle
length: 0.3
- gauge: 0.5 mm
+ gauge: 0.5 mm2
colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
connections:
- # attach ferrules
- - F1
+ - F1 # no need for list of connections; one ferrule per wire is auto-generated and attached
- W1: [1-4] # a new ferrule is auto-generated for each wire
- # attach connectors (separetely from ferrules)
- W1: [1-4]
@@ -213,10 +231,14 @@ Output:

-## Custom ferrules
+[Bill of Materials](tutorial05.bom.tsv)
+
+
+## 6 - Custom ferrules
* Custom ferrules
* Allows attaching more than one wire to a ferrule
+ * Requires defining them as regular connectors with unique designators, adding `category: ferrule` parameter
[Source](tutorial06.yml):
@@ -226,7 +248,7 @@ connectors:
pinout: [+12V, GND, GND, +5V]
type: Molex 8981
subtype: female
- F_10_1: # manually define a ferrule (with unique identifier)
+ F_10_1: # manually define a ferrule (with unique designator)
category: ferrule
type: Ferrule, crimp
subtype: 1.0 mm²
@@ -242,7 +264,7 @@ cables:
W1:
category: bundle # budnle
length: 0.3
- gauge: 0.5 mm
+ gauge: 0.5 mm2
colors: [YE, BK, BK, RD] # custom colors, wirecount is implicit
connections:
@@ -266,9 +288,13 @@ Output:

-## Daisy chaining (II)
+[Bill of Materials](tutorial06.bom.tsv)
+
+
+## 7 - Daisy chaining (II)
* Zig-zag daisy chain
+ * Convenient for longer chains
[Source](tutorial07.yml):
@@ -332,3 +358,6 @@ Output:

+[Bill of Materials](tutorial07.bom.tsv)
+
+
diff --git a/tutorial/tutorial02.md b/tutorial/tutorial02.md
index 6b58fbd..9d39bf7 100644
--- a/tutorial/tutorial02.md
+++ b/tutorial/tutorial02.md
@@ -1,5 +1,5 @@
## Adding parameters and colors
* Parameters for connectors and cables
-* Auto-calculate AWG from mm2
+* Auto-calculate equivalent AWG from mm2
* Non-sequential wiring
diff --git a/tutorial/tutorial02.yml b/tutorial/tutorial02.yml
index fde5a9e..030e42e 100644
--- a/tutorial/tutorial02.yml
+++ b/tutorial/tutorial02.yml
@@ -15,7 +15,7 @@ cables:
# more cable parameters:
length: 1
gauge: 0.25 mm2
- show_equiv: true
+ show_equiv: true # auto-calculate AWG equivalent
colors: [WH, BN, GN, YE]
connections:
diff --git a/tutorial/tutorial04.md b/tutorial/tutorial04.md
index a2ed709..37cbe79 100644
--- a/tutorial/tutorial04.md
+++ b/tutorial/tutorial04.md
@@ -1,6 +1,7 @@
-## Templates (II), notes,American standards, daisy chaining (I)
+## Templates (II), notes, American standards, daisy chaining (I)
* Overriding template parameters
-* Add nodes to connectors (and cables)
+* Add nodes to connectors and cables
* American standards: AWG gauge and IEC colors
* Linear daisy-chain
+ * Convenient for shorter chains
diff --git a/tutorial/tutorial04.yml b/tutorial/tutorial04.yml
index b6ef9d6..6286e94 100644
--- a/tutorial/tutorial04.yml
+++ b/tutorial/tutorial04.yml
@@ -17,7 +17,7 @@ cables:
W1: &template_cbl
wirecount: 4
length: 0.3
- gauge: 24 AWG # specifying guage in AWG directly
+ gauge: 24 AWG # specify gauge in AWG directly
color_code: IEC # IEC 62 colors also supported
notes: This cable is a bit longer
W2:
diff --git a/tutorial/tutorial05.bom.tsv b/tutorial/tutorial05.bom.tsv
index ea7ee62..973d4cd 100644
--- a/tutorial/tutorial05.bom.tsv
+++ b/tutorial/tutorial05.bom.tsv
@@ -1,6 +1,6 @@
Item Qty Unit Designators
Connector, Ferrule, crimp, 0.5 mm², OG 4
Connector, Molex 8981, female, 4 pins 1 X1
-Wire, 0.5 mm, BK 0.6 m W1
-Wire, 0.5 mm, RD 0.3 m W1
-Wire, 0.5 mm, YE 0.3 m W1
+Wire, 0.5 mm², BK 0.6 m W1
+Wire, 0.5 mm², RD 0.3 m W1
+Wire, 0.5 mm², YE 0.3 m W1
diff --git a/tutorial/tutorial05.gv b/tutorial/tutorial05.gv
index 3f4b791..fff2bcc 100644
--- a/tutorial/tutorial05.gv
+++ b/tutorial/tutorial05.gv
@@ -61,5 +61,5 @@ graph {
W1:w3:e -- X1:p3l:w
edge [color="#000000:#ff0000:#000000"]
W1:w4:e -- X1:p4l:w
- W1 [label=<
> fillcolor=white margin=0 shape=box style="filled,dashed"]
+ W1 [label=<> fillcolor=white margin=0 shape=box style="filled,dashed"]
}
diff --git a/tutorial/tutorial05.html b/tutorial/tutorial05.html
index 445d948..622ebc9 100644
--- a/tutorial/tutorial05.html
+++ b/tutorial/tutorial05.html
@@ -4,37 +4,37 @@
-