Returns a string which is the HTML documentation for the libraries
named by libs. Libs is a vector of symbols identifying Clojure
libraries.
(defn generate-documentation
"Returns a string which is the HTML documentation for the libraries
named by libs. Libs is a vector of symbols identifying Clojure
libraries."
[libs]
(dorun (map load-lib libs))
(let [writer (new java.io.StringWriter)]
(binding [*out* writer]
(prxml
[:html {:xmlns "http://www.w3.org/1999/xhtml"}
[:head
[:title "Clojure documentation browser"]
[:style *style*]
[:script {:language "JavaScript" :type "text/javascript"} [:raw! *script*]]
[:script {:language "JavaScript" :type "text/javascript"}
[:raw! "// "]]]
(let [lib-vec (sort libs)]
(into [:body (generate-lib-links lib-vec)]
(map generate-lib-doc lib-vec)))]))
(.toString writer)))
Comments top
No comments for generate-documentation. Log in to add a comment.