1.2.0 permalink Arrow_down_16x16

generate-documentation

clojure.contrib.gen-html-docs

  • (generate-documentation libs)
Returns a string which is the HTML documentation for the libraries
named by libs. Libs is a vector of symbols identifying Clojure
libraries.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/gen_html_docs.clj:431 top

(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)))
Vars in clojure.contrib.gen-html-docs/generate-documentation: binding defn dorun let map
Used in 0 other vars

Comments top

No comments for generate-documentation. Log in to add a comment.