     (spit filename cljsdoc-content) ;; use `:append true` to see overwrites
     ))
 
+(defn dump-edn-file!
+  [api]
+  (let [outfile (str *output-dir* "/" edn-output-file)
+        transform (fn [x]
+                    (-> x
+                        (select-keys [:full-name
+                                      :ns
+                                      :name
+                                      :type
+                                      :signatures
+                                      :history
+                                      :return-type
+                                      :filename
+                                      :github-link
+                                      :source])
+                        (rename-keys {:filename    :source-filename
+                                      :github-link :source-link})))
+        outdata (map transform api)]
+  (spit outfile (pr-str outdata))))
+
 (defn dump-api-docs!
   [api]
   (doseq [item api]
-    (dump-doc-file! item)))
+    (dump-doc-file! item))
+  (dump-edn-file! api))
 
 ;;------------------------------------------------------------
 ;; Examples Scraping from clojuredocs.org


(defn transform-repl-special-doc
  [doc-map]
  (println "repl-special-doc-map")
  (prn doc-map)
  (let [transform-val (fn [value]
                        (-> value
                            (rename-keys {:doc :docstring, :arglists :signatures})


(def docs-branch "docs")
(def examples-branch "examples")

(def edn-output-file "autodocs.edn")

;; location of the documents generated by this program
(def ^:dynamic *output-dir* nil)
