registrar

Files related to my duties as Registrar of Agora Nomic
git clone git://juanmeleiro.mat.br/registrar
Log | Files | Refs | README

commit 93bffbe0b66f8ee622ddd66e2130594bb2a91788
parent 544a14fd1cd4dca296a40cb8fb7bf6b5aec463f4
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date:   Fri,  6 Jun 2025 13:34:18 -0300

Add a check command

Diffstat:
MREADME.md | 4++++
Mchecklists/registration.txt | 3+++
Alib/check.lua | 9+++++++++
Mregistrar | 5+++++
4 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -52,6 +52,10 @@ purposes of inactivating them. If you find a good procedure, update this documentation and create the relevant checklists. For now, I (juan) am leaving this to other players. + +- After any modification, you may run `./registrar check` to check the + integrity of this repository. This is not comprehensive, but it's an aid. + ## Repository structure - `BACKLOG.md`. Notes on things to do to improve this repository and related things. diff --git a/checklists/registration.txt b/checklists/registration.txt @@ -31,6 +31,9 @@ Changes ......................... COMMIT descriptive message like “Register <playername>”. +Check .............................. RUN + ./registrar check + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ FIM ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ diff --git a/lib/check.lua b/lib/check.lua @@ -0,0 +1,9 @@ +require "lib.utils" + +local check = function(args, players, log) + os.exit(0) + -- luacheck + -- check documentation is covering +end + +return check diff --git a/registrar b/registrar @@ -11,6 +11,7 @@ local report = require "lib.report" local birthday = require "lib.birthday" local activity = require "lib.activity" local writ = require "lib.writ" +local check = require "lib.check" local parser = argparse("registrar", "Manage Agora's registrar duties") parser:flag("-p", "Pretend: only show what would be done") @@ -68,6 +69,8 @@ cmd.writ: argument("when", "Date of the message") :convert(tonumber) cmd.writ: argument("cantus", "Path to file containing the Cantus Cygneus") cmd.writ: option("-m", "Message ID of the cantus") +cmd.check = parser: command("check", "Check the integrity of this repository and display any errors.\nReturn status is 0 if everything is ok.") + -- Deserialize local fns = { players = "players.json", @@ -100,6 +103,8 @@ elseif args.command == "readdress" then registration.readdress(args, players, log) elseif args.command == "writ" then writ(args, players, log) +elseif args.command == "check" then + check(args, player, log) else io.write("Unknown command.\n") end