registrar

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 6a8a1b9e4ec182a8985887b4b85206ef40fe5ffb
parent ea626d3db13b6c5229c8556220fb38293f79276d
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date:   Thu,  1 Jun 2023 17:04:12 -0300

monthly: Adapt writs to players.json

Diffstat:
Mmonthly/format.lua | 2+-
Mmonthly/writs.m4 | 9++++++---
Rmonthly/players.json -> players.json | 0
3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/monthly/format.lua b/monthly/format.lua @@ -1,5 +1,5 @@ json = require "json" -fn = "monthly/players.json" +fn = "players.json" f = io.open(fn, "r") j = f:read("*all") diff --git a/monthly/writs.m4 b/monthly/writs.m4 @@ -1,3 +1,6 @@ -define(HEADING, PLAYER $1 DATE ------- $1 ----------)dnl -esyscmd(`grep "^w" monthly/history.tsv | cut -f 2,5 | column -t -N "HEADING(\`,')"') +define(WIDTH, esyscmd(jq -r '.[][] | select(.reason == "w") | "\(.name)"' players.json | wc -L | tr -d '\n')) +define(`complete', `ifelse(eval(len(`$1') < $3), `1', `$1'repeat(eval(`$3' - len(`$1')), `$2'), `$1')')dnl +define(`repeat', `ifelse(eval($1 > 0), `1', `$2repeat(decr($1), `$2', BLAH)')')dnl +complete(`PLAYER', ` ', eval(WIDTH + 2))DATE +repeat(WIDTH, `-') ---------- +esyscmd(jq -r '.[][] | select(.reason == "w") | "\(.name)\t\(.deregistration)"' players.json | column -t) diff --git a/monthly/players.json b/players.json