Compare commits
No commits in common. "6facd2a2cca0b23365a72a9f7b7487fb1a119799" and "aa5d9383aa503f382515d22a11d65a709cdcc1b8" have entirely different histories.
6facd2a2cc
...
aa5d9383aa
4 changed files with 22 additions and 50 deletions
|
@ -1,8 +1,8 @@
|
|||
set terminal pngcairo size 1000,600
|
||||
set title "Members stats"
|
||||
set output 'members-base-stats-2023-11.png'
|
||||
set output 'members-base-stats.png'
|
||||
|
||||
src='members-base-stats-2023-11.data'
|
||||
src='members-base-stats.data'
|
||||
|
||||
set timefmt "%Y-%m"
|
||||
set xdata time
|
||||
|
@ -15,8 +15,8 @@ set grid
|
|||
|
||||
set key out right
|
||||
|
||||
plot[1420066800:][0:] \
|
||||
src u 1:3 w l lw 2 t 'active', \
|
||||
plot[][0:] \
|
||||
src u 1:3 w l t 'active', \
|
||||
src u 1:4 w l t 'suspended', \
|
||||
src u 1:5 w l t 'students', \
|
||||
src u 1:6 w l t 'destroyed'
|
||||
|
|
|
@ -48,9 +48,7 @@
|
|||
util-stdout
|
||||
table
|
||||
export-web-static
|
||||
dokuwiki
|
||||
racket-kwargs
|
||||
util-string)
|
||||
dokuwiki)
|
||||
|
||||
;; Command-line options and configurable parameters
|
||||
(define -needs-bank- (make-parameter #f))
|
||||
|
@ -239,6 +237,9 @@
|
|||
mls)
|
||||
mls))
|
||||
(values #f #f)))
|
||||
(define internal-ml (if MLS (find-mailman-list MLS "internal") #f))
|
||||
(define council-ml (if MLS (find-mailman-list MLS "rada") #f))
|
||||
(define revision-ml (if MLS (find-mailman-list MLS "rk") #f))
|
||||
|
||||
;; Load DokuWiki users
|
||||
(define MB (if MB1
|
||||
|
@ -283,31 +284,30 @@
|
|||
(print " " (car keys) ": " (length (ldict-ref status (car keys)))))
|
||||
(loop (cdr keys)))))))
|
||||
|
||||
(define* (check-mailing-list mls name #:pred? (pred? #f))
|
||||
(define (capitalize s)
|
||||
(let ((l (string->list s)))
|
||||
(list->string
|
||||
(cons
|
||||
(char-upcase (car l))
|
||||
(map char-downcase (cdr l))))))
|
||||
|
||||
(define (check-mailing-list mls name)
|
||||
(define ml (find-mailman-list mls name))
|
||||
(let-values (((missing surplus)
|
||||
(mailman-compare-members ml
|
||||
(mbase-active-emails MB
|
||||
#:suspended #t
|
||||
#:pred? pred?
|
||||
))))
|
||||
(mbase-active-emails MB #:suspended #t))))
|
||||
(if (null? (cdr ml))
|
||||
(print "Skipping ML check - not loaded")
|
||||
(if (and (null? missing)
|
||||
(null? surplus))
|
||||
(print (format "~a mailing list membership in sync." (string-capitalize name)))
|
||||
(print (format "~a mailing list membership in sync." (capitalize name)))
|
||||
(let ()
|
||||
(print (format "~a mailing list:" (string-capitalize name)))
|
||||
(print (format "~a mailing list:" (capitalize name)))
|
||||
(when (not (null? missing))
|
||||
(print " Missing: " missing))
|
||||
(when (not (null? surplus))
|
||||
(print " Outsiders: " surplus)))))))
|
||||
|
||||
(define (rada-ml-pred? mr)
|
||||
(or (brmember-council? mr)
|
||||
(brmember-chair? mr)
|
||||
(brmember-revision? mr)))
|
||||
|
||||
;; Perform requested action
|
||||
(case (-action-)
|
||||
((print-info)
|
||||
|
@ -320,8 +320,7 @@
|
|||
(print-members-base-table MB)
|
||||
(newline)
|
||||
(check-mailing-list MLS "internal")
|
||||
(check-mailing-list MLS "rada"
|
||||
#:pred? rada-ml-pred?)
|
||||
(check-mailing-list MLS "rada" #:pred? brmember-council?)
|
||||
(check-mailing-list MLS "rk" #:pred? brmember-revision?)
|
||||
(print-git-status)))
|
||||
(newline))
|
||||
|
@ -390,14 +389,7 @@
|
|||
(print-unpaired-table MB))
|
||||
((mlsync)
|
||||
(cond ((-normal-month-)
|
||||
(mailman-sync-members (find-mailman-list MLS "internal")
|
||||
(mbase-active-emails MB #:suspended #t))
|
||||
(mailman-sync-members (find-mailman-list MLS "rada")
|
||||
(mbase-active-emails MB
|
||||
#:pred? rada-ml-pred?))
|
||||
(mailman-sync-members (find-mailman-list MLS "rk")
|
||||
(mbase-active-emails MB
|
||||
#:pred? brmember-revision?)))
|
||||
(mailman-sync-members internal-ml (mbase-active-emails MB #:suspended #t)))
|
||||
(else
|
||||
(print "Mailman synchronization disabled with manually specified current month."))))
|
||||
((notify)
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
(chicken format))
|
||||
|
||||
;; Short banner
|
||||
(define banner-line "HackerBase 1.12 (c) 2023 Brmlab, z.s.")
|
||||
(define banner-line "HackerBase 1.11 (c) 2023 Brmlab, z.s.")
|
||||
|
||||
;; Banner source with numbers for ANSI CSI SGR
|
||||
(define banner-source "
|
||||
|
|
|
@ -37,8 +37,6 @@
|
|||
|
||||
string-upcase
|
||||
|
||||
string-capitalize
|
||||
|
||||
string-tests!
|
||||
)
|
||||
|
||||
|
@ -102,18 +100,6 @@ using ```char-upcase```. Does not work with UTF-8.")
|
|||
(map char-upcase
|
||||
(string->list str))))
|
||||
|
||||
(define/doc (string-capitalize str)
|
||||
("* ```str``` - arbitrary string
|
||||
|
||||
Returns the ```str``` with the first character converted to upper case
|
||||
using ```char-upcase``` and the remainder converted to lower case
|
||||
using ```char-downcase```. Does not work with UTF-8.")
|
||||
(let ((l (string->list str)))
|
||||
(list->string
|
||||
(cons
|
||||
(char-upcase (car l))
|
||||
(map char-downcase (cdr l))))))
|
||||
|
||||
;; Performs utils module self-tests.
|
||||
(define (string-tests!)
|
||||
(run-tests
|
||||
|
@ -136,12 +122,6 @@ using ```char-downcase```. Does not work with UTF-8.")
|
|||
(test-equal? string-upcase
|
||||
(string-upcase "asdFGH")
|
||||
"ASDFGH")
|
||||
(test-equal? string-capitalize
|
||||
(string-capitalize "asdf")
|
||||
"Asdf")
|
||||
(test-equal? string-capitalize
|
||||
(string-capitalize "ASDF")
|
||||
"Asdf")
|
||||
))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue