Get all files with problems.

This commit is contained in:
Dominik Pantůček 2023-03-27 17:39:41 +02:00
parent 0a688fc057
commit fc6c67004e
2 changed files with 13 additions and 0 deletions

View file

@ -88,6 +88,7 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(-gencards (file:cards file:desfires) "Generates brmdoor-compatible card files"
(-action- 'gencards)
(-fname- (list file:cards file:desfires)))
(-problems () "Prints all files with problems" (-action- 'problems))
)
;; Run tests
@ -157,4 +158,11 @@ CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
(newline))
((gencards)
(apply cards-export MB (-fname-)))
((problems)
(let loop ((mb MB))
(when (not (null? mb))
(when (member-highlights? (car mb))
(newline)
(print-member-source (car mb)))
(loop (cdr mb)))))
)

View file

@ -43,6 +43,7 @@
member-record-info
member-missing-keys
member-highlights?
member-destroyed?
member-suspended?
@ -194,6 +195,10 @@
(if v acc (cons k acc)))
(dict-ref mr 'info)))
;; True if there are any source highlights
(define (member-highlights? mr)
(dict-has-key? mr 'highlights))
;; Returns true if the member record represents destroyed member. The
;; *current-month* is a global parameter from period module.
(define (member-destroyed? mr)