Created
December 22, 2009 18:00
-
-
Save devn/261911 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn build-filename [input] | |
(str "_" (second (re-find #"\/(.*)\Z" (str input))))) | |
(defn sort-ns | |
"Sorts the vals from the map returned by ns-publics for a given nspace into alphabetical order." | |
[nspace] | |
(vals (ns-publics nspace))) | |
(defn print-core-docs-to-files | |
[path-to-files] | |
(let [docs (sort-ns 'clojure.core)] | |
(doseq [s docs] | |
(let [filename (build-filename s)] | |
(with-out-writer (file-str path-to-files filename) | |
(print-doc s)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment