(module html-utils (tabularize itemize enumerate html-page combo-box hidden-input text-input submit-input) (import chicken scheme files data-structures posix utils) (use html-tags srfi-13) (define (tabularize data #!key table-id table-class quote-procedure even-row-class odd-row-class header thead/tbody) (let ((even-row #f)) ( id: table-id class: table-class quote-procedure: quote-procedure (string-append (if header (let ((h ( (string-intersperse (map h) h)) "") (let ((body (string-intersperse (map (lambda (line) ( class: (and even-row-class odd-row-class (begin (set! even-row (not even-row)) (if even-row even-row-class odd-row-class))) (string-intersperse (map body) body)))))) (define (html-list listing self items #!key list-id list-class quote-procedure) (listing id: list-id class: list-class quote-procedure: quote-procedure (string-intersperse (map (lambda (item) (if (list? item) (self item quote-procedure: quote-procedure) (
  • item))) items) ""))) (define (itemize items #!key list-id list-class quote-procedure) (html-list
  • header) "")))) (if thead/tbody (
    line) ""))) data) ""))) (if thead/tbody (