From dfae8ae26dfbc859fd4c49d32cfa380ea260f2bc Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Mon, 30 Oct 2023 16:21:23 +0100 Subject: Update lots of shit --- scripts/gen-america | 42 ++++++++++++++++++++++++++++++++++++++++++ scripts/gen-pres | 39 --------------------------------------- 2 files changed, 42 insertions(+), 39 deletions(-) create mode 100755 scripts/gen-america delete mode 100755 scripts/gen-pres (limited to 'scripts') diff --git a/scripts/gen-america b/scripts/gen-america new file mode 100755 index 0000000..bc7bd95 --- /dev/null +++ b/scripts/gen-america @@ -0,0 +1,42 @@ +#!/bin/sh + +gawk ' +@include "scripts/getcls.awk" + +function getsup(i, s) +{ + switch (i) { + case 1: + s = "D" + break + case 2: + s = "P" + break + case 3: + s = "S" + break + case 4: + s = "W" + break + } + + return "@sup{-" s "}" +} + +BEGIN { + FS = "\t" +} + +{ + printf "trX { td .missing colspan=\"2\" {-%s}", $3 + split($2, a, / /) + for (i = 1; i <= length(a); i++) + printf "td .%s colspan=\"1\" {-%s %s}", getcls(a[i]), $1, getsup(i) + print "}" +} + +END { + print "__MARKER__" +} +' data/world/$1.us \ +| scripts/last-of-design.sed diff --git a/scripts/gen-pres b/scripts/gen-pres deleted file mode 100755 index 6106b99..0000000 --- a/scripts/gen-pres +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh - -gawk ' -@include "scripts/getcls.awk" - -function getsup(i, s) -{ - switch (i) { - case 1: - s = "D" - break - case 2: - s = "P" - break - case 3: - s = "S" - break - } - - return "@sup{-" s "}" -} - -BEGIN { - FS = "\t" -} - -{ - printf "trX { td .missing colspan=\"2\" {-%s}", $3 - split($2, a, / /) - for (i = 1; i <= length(a); i++) - printf "td .%s colspan=\"1\" {-%s %s}", getcls(a[i]), $1, getsup(i) - print "}" -} - -END { - print "__MARKER__" -} -' data/world/pds.us \ -| scripts/last-of-design.sed -- cgit v1.2.3