Finish member-record documentation.

This commit is contained in:
Dominik Pantůček 2023-04-03 21:44:39 +02:00
parent c175dc2ae4
commit a699bce5fe

View file

@ -196,6 +196,115 @@ Returns ```#t``` if there are any ```'error``` type highlights in
```mr```, or it is not ```member-record-usable?``` or the
```member-id``` is not 4-digit prime number.
(member-destroyed? mr)
* ```mr``` - a member record structure
Returns ```#t``` if the member is not existing and already has existed
in the past.
(member-suspended? mr)
* ```mr``` - a member record structure
Returns ```#t``` if the current month falls within any of given member's
suspended periods.
(member-active? mr)
* ```mr``` - a member record structure
Returns ```#t``` if given member exists, is a member and is currently
not suspended.
(member-student? mr)
* ```mr``` - a member record structure
Returns ```#t``` if given member exists, is a member, is currently not
suspended and current month falls within any member's suspended
periods.
(member-existing? mr)
* ```mr``` - a member record structure
Returns ```#t``` if given member exists - that is the current month is
within any of the member (membership) periods.
(member-flags mr)
* ```mr``` - a member record structure
Returns a list of member flags which can be any of the following:
* ```'student```
* ```'suspended```
* ```'active```
* ```'destroyed```
* ```'existing```
The ```'existing``` and ```'destroyed``` are mutually exclusive. Also
```'active``` and ```'suspended``` are mutually exclusive.
(member-nick mr)
* ```mr``` - a member record structure
Returns member's nick from its ```'info``` section.
(member-id mr)
* ```mr``` - a member record structure
Returns given member's id.
(member-suspended-months mr)
* ```mr``` - a member record structure
Returns the number of months this member is suspended in
```(*current-month*)```. If the member is not suspended, returns
```0```.
(member-format fmt mr)
* ```fmt``` - format string
* ```mr``` - a member record structure
Fills the following template substitutions in the ```fmt``` string:
* ```~N``` - member's nick
* ```~I``` - member's id
* ```~S``` - number of months this member has been suspended
* ```~E``` - number of highlights in square brackets if there is at least one
* ```~~``` - literal ```~```
Other parts of the string are retained.
(member<? a b)
* ```a``` - a member record structure
* ```b``` - a member record structure
Returns true if member ```a```'s nick comes before ```b```'s nick in
the lexicographical order.
(member-record-add-payment mr pt)
* ```mr``` - a member record structure
* ```pt``` - bank transaction of the payment
Adds (prepends) given transaction ```pt``` to given member record
```mr```'s ```'payments'``` key list.
(member-payments mr)
* ```mr``` - a member record structure
Returns the payments (bank transactions) list of given member record
```mr``` defaulting to an empty list.
### Member Parser
### Members Directory