summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-notes-ez
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-29 22:39:48 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-10-29 22:39:48 +0100
commit9cad508b5c98ca1029460807249cafb712f28f1e (patch)
tree2ad62d1ca57b7dc691550865cb7fb0b55c26da34 /scripts/gen-notes-ez
parentc88b4c2d0842dfbb32fa744dde781601b9e4e7cf (diff)
Migrate the site to GSP and a Makefile
Diffstat (limited to 'scripts/gen-notes-ez')
-rwxr-xr-xscripts/gen-notes-ez35
1 files changed, 35 insertions, 0 deletions
diff --git a/scripts/gen-notes-ez b/scripts/gen-notes-ez
new file mode 100755
index 0000000..68d09a7
--- /dev/null
+++ b/scripts/gen-notes-ez
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Europa 50 X
+
+gawk -v S=$1 '
+@include "scripts/getcls.awk"
+
+$1 == S {
+ data[$2] = $3
+ indices[++i] = $2
+}
+
+END {
+ asort(indices)
+ for (i = 1; i <= length(indices); i++) {
+ x = i % 4
+ if (x == 1)
+ printf "trX {"
+
+ printf "td .%s colspan=\"X\" {-€%d}", getcls(data[indices[i]]), indices[i]
+
+ if (x == 0) {
+ print "}"
+ ends++
+ }
+ }
+
+ if ((length(data) / 4) > ends)
+ print "}"
+
+ print "__MARKER__"
+}
+' data/world/notes.ez \
+| scripts/colspan.sed \
+| scripts/last-of-design.sed