From 69a6019826250503f268a39e0adca8eae7b83936 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 28 Mar 2020 17:10:32 +0000 Subject: [PATCH] quacks-ingredients: better counting reports, more Signed-off-by: Ian Jackson --- quacks-ingredients-L1.scad | 2 +- quacks-ingredients-L2.scad | 2 +- quacks-ingredients-L3.scad | 2 +- quacks-ingredients-L4.scad | 2 +- quacks-ingredients-L5.scad | 2 +- quacks-ingredients-counts | 7 +++-- quacks-ingredients-counts.scad | 50 ++++++++++++++++---------------- quacks-ingredients-update-levels | 10 +++---- 8 files changed, 39 insertions(+), 38 deletions(-) diff --git a/quacks-ingredients-L1.scad b/quacks-ingredients-L1.scad index 9e2f9f5..5a85e58 100644 --- a/quacks-ingredients-L1.scad +++ b/quacks-ingredients-L1.scad @@ -1,4 +1,4 @@ -// autogenerated by quacks-ingredients-updates-levels - do not edit +// autogenerated by quacks-ingredients-updates-levels - do not edit $phase=1; module Token_L(){ Token_L1(); } //// toplevels-from: diff --git a/quacks-ingredients-L2.scad b/quacks-ingredients-L2.scad index 1472e41..6c7a087 100644 --- a/quacks-ingredients-L2.scad +++ b/quacks-ingredients-L2.scad @@ -1,4 +1,4 @@ -// autogenerated by quacks-ingredients-updates-levels - do not edit +// autogenerated by quacks-ingredients-updates-levels - do not edit $phase=2; module Token_L(){ Token_L2(); } //// toplevels-from: diff --git a/quacks-ingredients-L3.scad b/quacks-ingredients-L3.scad index 5de96bc..b39277d 100644 --- a/quacks-ingredients-L3.scad +++ b/quacks-ingredients-L3.scad @@ -1,4 +1,4 @@ -// autogenerated by quacks-ingredients-updates-levels - do not edit +// autogenerated by quacks-ingredients-updates-levels - do not edit $phase=3; module Token_L(){ Token_L3(); } //// toplevels-from: diff --git a/quacks-ingredients-L4.scad b/quacks-ingredients-L4.scad index f5f9b07..9f86e2a 100644 --- a/quacks-ingredients-L4.scad +++ b/quacks-ingredients-L4.scad @@ -1,4 +1,4 @@ -// autogenerated by quacks-ingredients-updates-levels - do not edit +// autogenerated by quacks-ingredients-updates-levels - do not edit $phase=4; module Token_L(){ Token_L4(); } //// toplevels-from: diff --git a/quacks-ingredients-L5.scad b/quacks-ingredients-L5.scad index 88de61f..2f35fd3 100644 --- a/quacks-ingredients-L5.scad +++ b/quacks-ingredients-L5.scad @@ -1,4 +1,4 @@ -// autogenerated by quacks-ingredients-updates-levels - do not edit +// autogenerated by quacks-ingredients-updates-levels - do not edit $phase=5; module Token_L(){ Token_L5(); } //// toplevels-from: diff --git a/quacks-ingredients-counts b/quacks-ingredients-counts index e9f6acf..3e49a95 100755 --- a/quacks-ingredients-counts +++ b/quacks-ingredients-counts @@ -53,7 +53,8 @@ sub wrtoplevel () { $max_nrows = $nrows if $nrows > $max_nrows; $max_rowsz = $rowsz if $rowsz > $max_rowsz; my $ix = 0; - print "// $name: total=$total, rowsz=$rowsz, nrows=$nrows\n"; + printf "// %-10s total=%2d rowsz=$rowsz nrows=$nrows\n", + "$name", $total; foreach my $nspots (sort keys %$cs) { my $c = $cs->{$nspots}; print <error and die $!; diff --git a/quacks-ingredients-counts.scad b/quacks-ingredients-counts.scad index 46b4f55..1eeb70c 100644 --- a/quacks-ingredients-counts.scad +++ b/quacks-ingredients-counts.scad @@ -1,8 +1,8 @@ -// autogenerated - do not edit -// update script is quacks-ingredients-updates-levels -// source is quacks-ingredients-counts +// autogenerated - do not edit +// update script is quacks-ingredients-updates-levels +// source is quacks-ingredients-counts module 1xFour(){ ////toplevel -// 1xFour: total=1, rowsz=1, nrows=1 +// 1xFour total= 1 rowsz=1 nrows=1 union(){ Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -22,7 +22,7 @@ module 1xFour(){ ////toplevel }; } module 1xOne(){ ////toplevel -// 1xOne: total=1, rowsz=1, nrows=1 +// 1xOne total= 1 rowsz=1 nrows=1 union(){ Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -42,7 +42,7 @@ module 1xOne(){ ////toplevel }; } module 1xThree(){ ////toplevel -// 1xThree: total=1, rowsz=1, nrows=1 +// 1xThree total= 1 rowsz=1 nrows=1 union(){ Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -62,7 +62,7 @@ module 1xThree(){ ////toplevel }; } module 1xTwo(){ ////toplevel -// 1xTwo: total=1, rowsz=1, nrows=1 +// 1xTwo total= 1 rowsz=1 nrows=1 union(){ Frame($phase, token_pitch * [ 1 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -82,7 +82,7 @@ module 1xTwo(){ ////toplevel }; } module 2xFour(){ ////toplevel -// 2xFour: total=2, rowsz=2, nrows=1 +// 2xFour total= 2 rowsz=2 nrows=1 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -103,7 +103,7 @@ module 2xFour(){ ////toplevel }; } module 2xOne(){ ////toplevel -// 2xOne: total=2, rowsz=2, nrows=1 +// 2xOne total= 2 rowsz=2 nrows=1 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -124,7 +124,7 @@ module 2xOne(){ ////toplevel }; } module 2xThree(){ ////toplevel -// 2xThree: total=2, rowsz=2, nrows=1 +// 2xThree total= 2 rowsz=2 nrows=1 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -145,7 +145,7 @@ module 2xThree(){ ////toplevel }; } module 2xTwo(){ ////toplevel -// 2xTwo: total=2, rowsz=2, nrows=1 +// 2xTwo total= 2 rowsz=2 nrows=1 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 1 + 0.50 ]); $nspots = 1; @@ -166,7 +166,7 @@ module 2xTwo(){ ////toplevel }; } module 3xFour(){ ////toplevel -// 3xFour: total=3, rowsz=2, nrows=2 +// 3xFour total= 3 rowsz=2 nrows=2 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]); $nspots = 1; @@ -188,7 +188,7 @@ module 3xFour(){ ////toplevel }; } module 3xOne(){ ////toplevel -// 3xOne: total=3, rowsz=2, nrows=2 +// 3xOne total= 3 rowsz=2 nrows=2 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]); $nspots = 1; @@ -210,7 +210,7 @@ module 3xOne(){ ////toplevel }; } module 3xThree(){ ////toplevel -// 3xThree: total=3, rowsz=2, nrows=2 +// 3xThree total= 3 rowsz=2 nrows=2 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]); $nspots = 1; @@ -232,7 +232,7 @@ module 3xThree(){ ////toplevel }; } module 3xTwo(){ ////toplevel -// 3xTwo: total=3, rowsz=2, nrows=2 +// 3xTwo total= 3 rowsz=2 nrows=2 union(){ Frame($phase, token_pitch * [ 2 + 1.00, 2 + 0.50 ]); $nspots = 1; @@ -254,7 +254,7 @@ module 3xTwo(){ ////toplevel }; } module Black(){ ////toplevel -// Black: total=18, rowsz=5, nrows=4 +// Black total=18 rowsz=5 nrows=4 union(){ Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]); $nspots = 1; @@ -291,7 +291,7 @@ module Black(){ ////toplevel }; } module Blue(){ ////toplevel -// Blue: total=34, rowsz=6, nrows=6 +// Blue total=34 rowsz=6 nrows=6 union(){ Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]); $nspots = 1; @@ -344,7 +344,7 @@ module Blue(){ ////toplevel }; } module Green(){ ////toplevel -// Green: total=38, rowsz=7, nrows=6 +// Green total=38 rowsz=7 nrows=6 union(){ Frame($phase, token_pitch * [ 7 + 1.00, 6 + 0.50 ]); $nspots = 1; @@ -401,7 +401,7 @@ module Green(){ ////toplevel }; } module Orange(){ ////toplevel -// Orange: total=20, rowsz=5, nrows=4 +// Orange total=20 rowsz=5 nrows=4 union(){ Frame($phase, token_pitch * [ 5 + 1.00, 4 + 0.50 ]); $nspots = 1; @@ -440,7 +440,7 @@ module Orange(){ ////toplevel }; } module Purple(){ ////toplevel -// Purple: total=15, rowsz=4, nrows=4 +// Purple total=15 rowsz=4 nrows=4 union(){ Frame($phase, token_pitch * [ 4 + 1.00, 4 + 0.50 ]); $nspots = 1; @@ -474,7 +474,7 @@ module Purple(){ ////toplevel }; } module Red(){ ////toplevel -// Red: total=30, rowsz=6, nrows=5 +// Red total=30 rowsz=6 nrows=5 union(){ Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]); $nspots = 1; @@ -523,7 +523,7 @@ module Red(){ ////toplevel }; } module White(){ ////toplevel -// White: total=32, rowsz=6, nrows=6 +// White total=32 rowsz=6 nrows=6 union(){ Frame($phase, token_pitch * [ 6 + 1.00, 6 + 0.50 ]); $nspots = 1; @@ -574,7 +574,7 @@ module White(){ ////toplevel }; } module Yellow(){ ////toplevel -// Yellow: total=29, rowsz=6, nrows=5 +// Yellow total=29 rowsz=6 nrows=5 union(){ Frame($phase, token_pitch * [ 6 + 1.00, 5 + 0.50 ]); $nspots = 1; @@ -621,5 +621,5 @@ module Yellow(){ ////toplevel translate(token_pitch * [ 2.5, 1.0 ]) Token_L(); }; } -// total_count=240 total_real_count=216 -// max_rowsz=7 max_nrows=6 +// total_count=240 total_real_count=216 +// max_rowsz=7 max_nrows=6 diff --git a/quacks-ingredients-update-levels b/quacks-ingredients-update-levels index b54cca6..f0dbd4b 100755 --- a/quacks-ingredients-update-levels +++ b/quacks-ingredients-update-levels @@ -4,7 +4,7 @@ set -e for l in 1 2 3 4 5; do f=quacks-ingredients-L$l.scad cat >$f.tmp <$f.tmp <>$f.tmp mv -f $f.tmp $f -egrep '^//' $f | sort +egrep '^// [A-Za-z]' $f | sort -- 2.30.2