registrar

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

commit f6172aedda98bb380501ce73af6486849d2813ff
parent 2b3ae6052c03c4c17560fa99c6d5a7b9129fcbe6
Author: Juan F. Meleiro <juan@juanmeleiro.mat.br>
Date:   Wed, 28 May 2025 17:50:34 -0300

Reorganize repository

Diffstat:
ABACKLOG.md | 12++++++++++++
MREADME.md | 17++++++++++++++++-
Rlog.txt -> archive/2023-08-30-old-log.txt | 0
Dbirthdays/list | 21---------------------
Dscripts/birthday.fish | 58----------------------------------------------------------
Dscripts/deregistrations.jq | 14--------------
Dspecs/registrar.log.schema.json | 84-------------------------------------------------------------------------------
Dtickets/done/fora-as-data.txt | 4----
Dtickets/todo/allow-multiple-players.txt | 13-------------
Dtickets/todo/automated-news.txt | 5-----
Dtickets/todo/ditch-neomutt.txt | 7-------
Dtickets/todo/fix-deactivate-commit-message.txt | 4----
Dtickets/todo/log-custom-format.txt | 19-------------------
13 files changed, 28 insertions(+), 230 deletions(-)

diff --git a/BACKLOG.md b/BACKLOG.md @@ -0,0 +1,12 @@ +# BACKLOG + +- List the Registrar's duties and relevant rules +- Add graph with the number of players to website + +## Ditch neomutt + +Stop using neomutt and start using some other, simpler, command-line +smtp client. + +Why? Because revision is now done in a text editor and because we can +then capture the return status. diff --git a/README.md b/README.md @@ -1,4 +1,19 @@ -# Registrar's obligations/routines +# The Registrar's Repository + +## Repository structure + +- `BACKLOG.md`. Notes on things to do to improve this repository and related things. +- `README.md`. This file. +- `archive`. Archive of old files; mainly reports. +- `cantus`. Cantus Cygneus (not complete). +- `fora.json`. Data regarding fora, used by scripts. +- `lib`. Scripts that are called directly or indirectly by the main `registrar` script. +- `log.json`. Record of events. +- `players.json`. Current state of the game, as it relates to the Registrar's duties. +- `registrar`. The main Lua script for performing registrar actions. +- `templates`. Templates used for generating reports and other messages. + +## Registrar's obligations/routines - Weekly report - When? Once a week diff --git a/log.txt b/archive/2023-08-30-old-log.txt diff --git a/birthdays/list b/birthdays/list @@ -1,21 +0,0 @@ -1996-01-23 Murphy -2001-02-04 G. -2023-02-06 tb148 -2022-03-14 juan -2021-03-16 cuddlybanana -2023-03-16 Yachay -2008-04-28 ais523 -2007-05-01 omd -2023-05-16 inalienableWright -2023-05-18 blob -2023-05-18 beokirby -2023-05-23 Anneke-Constantine -2015-05-27 Gaelan -2019-06-02 Janet -2017-06-07 R. Lee -2022-06-25 4st -2013-08-14 nix -2016-09-13 Aspen -2022-10-19 Aced7 -2020-11-11 Shy Owl -2022-11-27 Marb diff --git a/scripts/birthday.fish b/scripts/birthday.fish @@ -1,58 +0,0 @@ -#!/usr/bin/fish - -set WIDTH 80 - -function ord -a num - switch "$num" - case 1 01 - echo st - case 2 02 - echo nd - case 3 03 - echo rd - case '*' - echo th - end -end - -fzf < birthdays/list | -read date name - -echo $date | read -d '-' birthyear month day - -set currentyear (date +%Y) -set currentstamp (date +%S) -set birthstamp (date +%S -d $date) - -if test (date +%S -d "$currentyear-$month-$day") -gt $currentstamp - # Most recent birthday was last year - set year (math $currentyear - 1) -else - # Most recent birthday was this year - set year $currentyear -end - -set MONTH (env LANG=en date +"%B" -d "$year-$month-$day") -set DATEORD (ord $day) -set COUNT (math "$year - $birthyear") -set COUNTORD (ord "$COUNT") -set DAY (string trim -l -c '0' $day) - -set DATE "The $DAY$DATEORD of $MONTH of $year" -set DATELEN (string length "$DATE") -set DATEPAD (repeat (math "floor(($WIDTH - $DATELEN)/2)") " ") - -set tmp (mktemp) -begin -echo 'Date: '(date -R) -echo 'From: juan <juan@juanmeleiro.mat.br>' -echo 'To: <agora-official@agoranomic.org>' -echo 'Subject: [Registrar] Birthday Announcement' -m4 --define=DATE="$DATEPAD$DATE" \ - --define=PLAYER="$name" \ - --define=COUNT="$COUNT$COUNTORD" \ - birthdays/template -end > $tmp -neomutt -E -H $tmp -rm $tmp - diff --git a/scripts/deregistrations.jq b/scripts/deregistrations.jq @@ -1,14 +0,0 @@ -[ -.[].history[] | -select((.protected | not) - and has("active") - and (.active | not) - and (.latest | - strptime("%Y-%m-%d") | - mktime < (now - 5184000))) -] | -( -"Cc: \([.[] | "\(.contact)" | gsub(" at "; "@") | gsub(" dot "; ".")] | join(", "))\n", -"I intend, without 3 objections, to deregister the following players:\n", -(.[] | "- \(.name)") -) diff --git a/specs/registrar.log.schema.json b/specs/registrar.log.schema.json @@ -1,83 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/vocab/validation", - "$vocabulary": { - "https://json-schema.org/draft/2020-12/vocab/validation": true - }, - "$id": "http://juanmeleiro.mat.br/agora/specs/registrar.log.schema.json", - "$ref": "http://juanmeleiro.mat.br/agora/specs/log.schema.json", - "items": { - "type": "object", - "oneOf": [ - { - "properties": { - "what": { - "const": "register" - } - }, - "required": ["who", "whence"] - }, - { - "properties": { - "what": { - "const": "weekly" - } - } - }, - { - "properties": { - "what": { - "const": "monthly" - } - } - }, - { - "properties": { - "what": { - "const": "activation" - } - }, - "required": ["who"] - }, - { - "properties": { - "what": { - "const": "deactivation" - } - }, - "required": ["who"] - }, - { - "properties": { - "what": { - "const": "deregister" - } - }, - "required": ["who"] - }, - { - "properties": { - "what": { - "const": "readdress" - } - }, - "required": ["who", "whither"] - }, - { - "properties": { - "what": { - "const": "rename" - } - }, - "required": ["who", "whither"] - }, - { - "properties": { - "what": { - "const": "writ" - } - }, - "required": ["who"] - } - ] - } -} -\ No newline at end of file diff --git a/tickets/done/fora-as-data.txt b/tickets/done/fora-as-data.txt @@ -1,4 +0,0 @@ -# Fora as Data - -Make the information about fora be rendered from JSON just like -players. Add commands to manage fora. diff --git a/tickets/todo/allow-multiple-players.txt b/tickets/todo/allow-multiple-players.txt @@ -1,13 +0,0 @@ -# Allow multiple players where applicable - -Allow for user to specify multiple players in commands where that is -applicable. Specifically: - -- register -- deregister -- activate -- deactivate - -The git message will list all of them in the title if the length is -short enough. Otherwise, it will display “<action> some players” -and specify eir names in the commit message body. diff --git a/tickets/todo/automated-news.txt b/tickets/todo/automated-news.txt @@ -1,5 +0,0 @@ -# Automated News - -Implement logic that detects changes from the previous report and -includes them in the NEWS section, possibly allowing for commentary from -the registrar. diff --git a/tickets/todo/ditch-neomutt.txt b/tickets/todo/ditch-neomutt.txt @@ -1,7 +0,0 @@ -# Ditch neomutt - -Stop using neomutt and start using some other, simpler, command-line -smtp client. - -Why? Because revision is now done in a text editor and because we can -then capture the return status. diff --git a/tickets/todo/fix-deactivate-commit-message.txt b/tickets/todo/fix-deactivate-commit-message.txt @@ -1,4 +0,0 @@ -# Fix deactivate commit message - -When deactivating a player, the commit message generated displays eir -name as “null”. diff --git a/tickets/todo/log-custom-format.txt b/tickets/todo/log-custom-format.txt @@ -1,19 +0,0 @@ -# Custom format for the log - -Design and implement a custom format for the log. Maybe something -like this: - -``` -<timestamp> <action> <arguments> -``` - -For example: - -``` -1696883312 register Some Player email@example.com message://some-long-uuid.message -``` - -Note the use of tabs. This would avoid the problem where the Lua library -that deals with JSON just scrambles it up each and every time. That, and -it also avoids adding new dependencies (e.g., `jq` for pretty-printing -and sorting the JSON files).