summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-30 00:20:08 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-10-30 00:20:08 +0100
commita0267d7afff488465d723d480f3b095a1ebfef9d (patch)
tree27cba8c099509c317e262ae0ea075f1509bac115 /scripts
parent138920eb6c3c9b1d724e8bb2259b4e5467a1301c (diff)
Make presidential dollars page better
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/gen-pres21
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/gen-pres b/scripts/gen-pres
index a1e7cb1..fbe1b5d 100755
--- a/scripts/gen-pres
+++ b/scripts/gen-pres
@@ -3,15 +3,32 @@
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=\"1\" {-%s}", $1
+ printf "trX { td .missing colspan=\"2\" {-%s}", $3
split($2, a, / /)
for (i = 1; i <= length(a); i++)
- printf "td .%s colspan=\"2\" {-%s}", getcls(a[i]), $3
+ printf "td .%s colspan=\"1\" {-%s%s}", getcls(a[i]), $1, getsup(i)
print "}"
}