From 9cad508b5c98ca1029460807249cafb712f28f1e Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 29 Oct 2023 22:39:48 +0100 Subject: Migrate the site to GSP and a Makefile --- scripts/gen-notes-ez | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 scripts/gen-notes-ez (limited to 'scripts/gen-notes-ez') 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 -- cgit v1.2.3