summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-notes-ez
diff options
context:
space:
mode:
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