summaryrefslogtreecommitdiffhomepage
path: root/scripts/gen-tnotes
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-tnotes
parentc88b4c2d0842dfbb32fa744dde781601b9e4e7cf (diff)
Migrate the site to GSP and a Makefile
Diffstat (limited to 'scripts/gen-tnotes')
-rwxr-xr-xscripts/gen-tnotes26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/gen-tnotes b/scripts/gen-tnotes
new file mode 100755
index 0000000..32d88c6
--- /dev/null
+++ b/scripts/gen-tnotes
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+gawk '
+@include "scripts/getcls.awk"
+
+BEGIN {
+ FS = "\t"
+}
+
+$1 == "TN" {
+ i++
+ col[i][0] = $2
+ col[i][1] = $3
+ col[i][2] = $4
+}
+
+END {
+ for (i = 1; i <= length(col); i++) {
+ printf "trX {td .missing colspan=\"1\" {-€%s}"\
+ "td .%s colspan=\"6\" {-%s}}\n",
+ col[i][0], getcls(col[i][2]), col[i][1]
+ }
+ print "__MARKER__"
+}
+' data/notes \
+| scripts/last-of-design.sed