Static web progress.
This commit is contained in:
parent
18d925156b
commit
72f4f82d5a
2 changed files with 19 additions and 6 deletions
|
@ -234,7 +234,7 @@ members-payments.import.scm: $(MEMBERS-PAYMENTS-SOURCES)
|
|||
WEB-STATIC-SOURCES=web-static.scm member-record.import.scm \
|
||||
configuration.import.scm members-payments.import.scm \
|
||||
members-base.import.scm util-io.import.scm \
|
||||
util-list.import.scm
|
||||
util-list.import.scm progress.import.scm
|
||||
|
||||
web-static.o: web-static.import.scm
|
||||
web-static.import.scm: $(WEB-STATIC-SOURCES)
|
||||
|
|
|
@ -45,7 +45,8 @@
|
|||
configuration
|
||||
members-payments
|
||||
members-base
|
||||
util-io)
|
||||
util-io
|
||||
progress)
|
||||
|
||||
;; Generate all the files in specified (default current) directory.
|
||||
(define (gen-web-static-member mr . dirs)
|
||||
|
@ -87,9 +88,21 @@
|
|||
(error 'gen-web-static "Directory is a file:" dir))
|
||||
(when (not (directory-exists? dir))
|
||||
(create-directory dir))
|
||||
(let loop ((mb (members-base-members mb)))
|
||||
(when (not (null? mb))
|
||||
(let* ((members-list (members-base-members mb))
|
||||
(mlen0 (length members-list))
|
||||
(mlen (if (> mlen0 0)
|
||||
mlen0
|
||||
1)))
|
||||
(with-progress%
|
||||
#t dir
|
||||
(let loop ((mb members-list)
|
||||
(i 0))
|
||||
(if (not (null? mb))
|
||||
(let ()
|
||||
(progress%-advance (/ i mlen))
|
||||
(gen-web-static-member (car mb) dir)
|
||||
(loop (cdr mb)))))
|
||||
(loop (cdr mb)
|
||||
(add1 i))))
|
||||
(progress%-advance 1)))))
|
||||
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue