       (:help options) (exit 0 (usage summary))
       (not= (count arguments) 1) (exit 1 (usage summary))
       errors (exit 1 (error-msg errors)))
-    (save-summitpost-search-results! (:file options) (first arguments))))
+    (save-summitpost-search-results! (:file options)
+                                     (first arguments)
+                                     (:include-child-content options))))

            [clojure.java.io :as io]
            [clojure.string :as string]
            [clojure.tools.cli :refer [parse-opts]]
            [scrape-summitpost-data.get-item-texts :refer [get-item-texts]])
  (:gen-class))

(def cli-options
  [["-f" "--file FILE" "File name for csv data"
    :default "data.csv"]
   ["-h" "--help"]])

(defn usage [options-summary]

(defn save-summitpost-search-results!
  "Save a csv of item names and page texts for all search result items found
  at `search-link`."
  [file-name search-link include-child-content?]
  (with-open [out-file (io/writer file-name)]
    (let [get-texts-fn (if include-child-content?
                         get-item-texts-with-children
                         get-item-texts)]
    (csv/write-csv out-file
                   (cons ["document-url", "document-name", "document-text"]
                         (get-texts-fn search-link))))))

(defn -main [& args]
  (let [{:keys [options arguments errors summary]} (parse-opts args cli-options)]
