Add sort of list members.
This commit is contained in:
parent
18dd1ff7ca
commit
3be39d55c4
1 changed files with 22 additions and 4 deletions
|
@ -39,6 +39,7 @@
|
|||
(chicken base)
|
||||
(chicken pathname)
|
||||
(chicken string)
|
||||
(chicken sort)
|
||||
utils)
|
||||
|
||||
;; Where does the mailman binaries reside
|
||||
|
@ -62,7 +63,9 @@
|
|||
|
||||
;; Returns the list of members of given list
|
||||
(define (list-mailman-list-members lst)
|
||||
(get-mailman-output-lines "list_members" lst))
|
||||
(sort
|
||||
(get-mailman-output-lines "list_members" lst)
|
||||
string<?))
|
||||
|
||||
;; Creates a representation of basic mailman list information
|
||||
(define (make-mailman-list name members)
|
||||
|
@ -73,16 +76,31 @@
|
|||
(define mailman-list-name car)
|
||||
(define mailman-list-members cdr)
|
||||
|
||||
;; Loads a single mailman list as mailman structure
|
||||
(define (load-mailman-list name)
|
||||
(make-mailman-list name
|
||||
(list-mailman-list-members name)))
|
||||
|
||||
;; Loads all lists and members
|
||||
(define (load-mailman-lists)
|
||||
(map
|
||||
(lambda (name)
|
||||
(make-mailman-list name
|
||||
(list-mailman-list-members name)))
|
||||
load-mailman-list
|
||||
(list-mailman-lists)))
|
||||
|
||||
;; List of lists, returns the whole list record (including name)
|
||||
(define (find-mailman-list lsts name)
|
||||
(assoc name lsts))
|
||||
|
||||
;; Ensures given email is in given ML
|
||||
(define (mailman-ensure-member ml email)
|
||||
#f)
|
||||
|
||||
;; Makes sure given member is removed
|
||||
(define (mailman-ensure-not-member ml email)
|
||||
#f)
|
||||
|
||||
;; Ensures given ML subscribers are exactly what is in emails list
|
||||
(define (mailman-sync-members ml emails)
|
||||
#f)
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue