" name ":\n | "
(apply (separate-with " .\n") links))))
(define indented-listing
(lambda categories
(list "\n"
(apply (separate-with "\n") categories)
"\n \n")))
(define comment
(lambda strs
(list "\n")))
(define p (lambda () "\n\n\n"))
(define br (lambda () " \n"))
(define cite
(lambda quotes
(list "" quotes "")))
(define usage
(lambda (prog-name)
(format #t (string-append "usage: ~a ~%"
" is the scheme-html source and~%"
" is the file in which to write the html output.~%"
" If is not specified, it defaults to the standard output.~%")
prog-name)))
(define main
(lambda (args)
(let* ((run-contents
(lambda ()
(if (eq? 'schemed-html-5 (read))
(eval (read) (interaction-environment))
(error (format #f (string-append "main: unrecognized header symbol~%"
"We were looking for the first symbol"
" of the file to be schemed-html-5~%")))))))
(case (length args)
((2) (let ((input-file (cadr args)))
(with-input-from-file input-file run-contents)))
((3) (let ((input-file (cadr args))
(output-file (caddr args)))
(with-output-to-file output-file
(lambda ()
(with-input-from-file input-file run-contents)))))
(else (let ((progname (car args)))
(usage progname)))))))
|