Basic information and member file.
This commit is contained in:
parent
cf7f79c846
commit
20b3c31bf5
1 changed files with 18 additions and 0 deletions
|
@ -35,10 +35,12 @@
|
||||||
(chicken base)
|
(chicken base)
|
||||||
(chicken format)
|
(chicken format)
|
||||||
(chicken pathname)
|
(chicken pathname)
|
||||||
|
(chicken string)
|
||||||
brmember
|
brmember
|
||||||
util-dir
|
util-dir
|
||||||
mbase)
|
mbase)
|
||||||
|
|
||||||
|
;; Prints the HTML summary for given member to current-output-port
|
||||||
(define (print-html-member mr)
|
(define (print-html-member mr)
|
||||||
(print "<html>")
|
(print "<html>")
|
||||||
(print "<head>")
|
(print "<head>")
|
||||||
|
@ -47,15 +49,31 @@
|
||||||
"</title>")
|
"</title>")
|
||||||
(print "</head>")
|
(print "</head>")
|
||||||
(print "<body>")
|
(print "<body>")
|
||||||
|
(print "<h1>Brmlab member " (brmember-nick mr) "</h1>")
|
||||||
|
(print "<hr>")
|
||||||
|
(print "<dl>")
|
||||||
|
(print "<dt>Nick:</dt><dd>" (brmember-nick mr) "</dd>")
|
||||||
|
(print "<dt>Id:</dt><dd>" (brmember-id mr) "</dd>")
|
||||||
|
(print "</dl>")
|
||||||
|
(print "<hr>")
|
||||||
|
(print "<h2>Member file</h2>")
|
||||||
|
(print "<pre>")
|
||||||
|
(print (string-translate*
|
||||||
|
(string-intersperse (brmember-source mr) "\n")
|
||||||
|
'(("<" . "<") (">" . ">") ("\"" . """))))
|
||||||
|
(print "</pre>")
|
||||||
|
(print "<hr>")
|
||||||
(print "</body>")
|
(print "</body>")
|
||||||
(print "</html>"))
|
(print "</html>"))
|
||||||
|
|
||||||
|
;; Generates a single member in given directory
|
||||||
(define (gen-html-member mr dir)
|
(define (gen-html-member mr dir)
|
||||||
(let ((fname (format "~A.html" (brmember-id mr))))
|
(let ((fname (format "~A.html" (brmember-id mr))))
|
||||||
(with-output-to-file (make-pathname dir (format "~A.html" (brmember-nick mr)))
|
(with-output-to-file (make-pathname dir (format "~A.html" (brmember-nick mr)))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(print-html-member mr)))))
|
(print-html-member mr)))))
|
||||||
|
|
||||||
|
;; Generates all members in given directory
|
||||||
(define (gen-html-members mb dir)
|
(define (gen-html-members mb dir)
|
||||||
(ensure-directory dir)
|
(ensure-directory dir)
|
||||||
(with-mbase-progress%
|
(with-mbase-progress%
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue