#!/usr/bin/guile \ -e main -s !# (add-to-load-path (dirname (current-filename))) (add-to-load-path (string-append (getenv "HOME") "/lib/guile")) (use-modules (parse) (sxml simple)) (define (build-table csv) `(table (@ (border 1)) (tr (th "Title") (th "Author")) ,@(map (lambda (i) `(tr (td ,(csv-ref csv 'title i)) (td ,(csv-ref csv 'author_details i)))) (iota (csv-length csv)))) ) (define (main args) (let ((csv (load-csv* "boklista.csv"))) (sxml->xml `(html (head (title "Boklista")) (body ,(build-table csv))))))