From fbc688c81fec18be363a5bfc37a8c5a875dd81fa Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Fri, 19 Jul 2019 10:57:14 +0100 Subject: [PATCH] Vitamins now sorted alphabetically in build instructions. --- examples/MainsBreakOutBox/readme.md | 24 ++++++++++++------------ scripts/views.py | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/examples/MainsBreakOutBox/readme.md b/examples/MainsBreakOutBox/readme.md index b94bce6..585160c 100644 --- a/examples/MainsBreakOutBox/readme.md +++ b/examples/MainsBreakOutBox/readme.md @@ -86,9 +86,9 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin ### Vitamins |Qty|Description| |--:|:----------| -|8| Washer M3 x 7mm x 0.5mm| -|4| Screw M3 dome x 10mm| |4| Nut M3 x 2.4mm nyloc| +|4| Screw M3 dome x 10mm| +|8| Washer M3 x 7mm x 0.5mm| ### 3D Printed parts @@ -122,14 +122,14 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin ### Vitamins |Qty|Description| |--:|:----------| -|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| -|1| Wire blue 30/0.25mm strands, length 150mm - not shown| -|2| Wire brown 30/0.25mm strands, length 150mm - not shown| |3| Heatshrink sleeving ID 3.2mm x 15mm - not shown| |1| IEC inlet for ATX| +|2| Nut M3 x 2.4mm nyloc| |2| Screw M3 cs cap x 12mm| |2| Washer M3 x 7mm x 0.5mm| -|2| Nut M3 x 2.4mm nyloc| +|1| Wire blue 30/0.25mm strands, length 150mm - not shown| +|2| Wire brown 30/0.25mm strands, length 150mm - not shown| +|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| ### Sub-assemblies @@ -161,15 +161,15 @@ Earth leakage can be measured Canadian CSA style by disconnected the neutral lin ### Vitamins |Qty|Description| |--:|:----------| -|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| -|1| Wire blue 30/0.25mm strands, length 150mm - not shown| -|5| Heatshrink sleeving ID 3.2mm x 15mm - not shown| -|3| Ferrule for 1.5mm^2 wire - not shown| -|1| Mains socket 13A| -|2| Screw M3 cs cap x 20mm| |2| 4mm shielded jack socket blue| |1| 4mm shielded jack socket brown| |2| 4mm shielded jack socket green| +|3| Ferrule for 1.5mm^2 wire - not shown| +|5| Heatshrink sleeving ID 3.2mm x 15mm - not shown| +|1| Mains socket 13A| +|2| Screw M3 cs cap x 20mm| +|1| Wire blue 30/0.25mm strands, length 150mm - not shown| +|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| ### Sub-assemblies diff --git a/scripts/views.py b/scripts/views.py index a1c4538..c04fd5e 100644 --- a/scripts/views.py +++ b/scripts/views.py @@ -267,7 +267,7 @@ def views(target, do_assemblies = None): print("### Vitamins", file = doc_file) print("|Qty|Description|", file = doc_file) print("|--:|:----------|", file = doc_file) - for v in vitamins: + for v in sorted(vitamins, key = lambda s: s.split(":")[-1]): print("|%d|%s|" % (vitamins[v], v.split(":")[1]), file = doc_file) print("\n", file = doc_file)