chickadee » phricken » sgm-filename

handle-sgm rootprocedure
sgm-filename index.sgmparameter

Serves up Scheme gophermaps. If sgm-filename exists in the directory indicated by the selector (relative to ROOT), read the file contents as a Scheme Gophermap and send the results. The file is read with read-file.

Expects to be attached to a resource (path is second submatch).


(match-resource "" (handle-sgm "/var/phricken/root"))
; An access to /pix/index.sgm will now render the
; contents of /var/phricken/root/pix/index.sgm

where index.sgm might contain:

(i "My pictures")
(i "-----------")
(I "Me at the Apollo" "/pix/apollo.jpg")
(I "Me at Carnegie Hall" "/pix/carnegie.jpg")