     (println (str (string/capitalize state) ": ") (string/join ", " (map :id (filter #(= (:state %) state) all-productions)))))
   (println )
   (println "Importing commercial audio books")
-  (println)
-  (println "Ready: " (count (ready-productions all-commercial-productions)))
-  (println (string/join ", " (map :id (ready-productions all-commercial-productions))))
-  (println)
-  (println "Archived: " (count (archived-productions all-commercial-productions)))
+  (println "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
+  (println)
+  (println "Ready:" (count (filter ready? all-commercial-productions)))
+  (println "-----")
+  (println (string/join ", " (map :id (filter ready? all-commercial-productions))))
+  (println)
+  (println "Archived:" (count (filter archived? all-commercial-productions)))
+  (println "--------")
   (println)
 )

          (copy-obi-project!)
          (create-obi-config-file!)))))

(def recording-productions-without-obi
  "All productions with state \"recording\" with wav files but no obi project"
  (filter #(not (contains-obi-project (get-all-files %)))
          recording-productions-with-wav))

(defn create-recording-productions-without-obi!
  "Create all productions with state \"recording\" with wav files that
  do not contain an obi project. Add to the db and create the directories"
  []
  (doseq [p recording-productions-without-obi]
    (-> p
        prod/create!
        prod/set-state-structured!

  [{id :id}]
  (get all-files-by-id id))

(defn ready? [production] (= (:state production) "ready"))
(defn archived? [production] (= (:state production) "archived"))
(defn recording? [production] (= (:state production) "recording"))
(defn recording-no-wav? [production] (and (recording? production)
                                          (not-any? wav-file? (get-all-files production))))
(defn recording-no-wav-with-struct? [production] (and (recording-no-wav? production)
                                                      (some struct-file? (get-all-files production))))
(defn recording-with-wav? [production] (and (recording? production)
                                            (some wav-file? (get-all-files production))))
(defn recording-with-obi? [production] (and (recording? production)
                                            (some wav-file? (get-all-files production))
                                            (some obi-project? (get-all-files production))))
(defn recording-with-wav-no-obi? [production] (and (recording? production)
                                                   (some wav-file? (get-all-files production))
                                                   (not-any? obi-project? (get-all-files production))))

(defn create-ready-productions!
  "Create all productions with state \"ready\""
  [productions]
  (doseq [p (filter ready? productions)]
    (if (:library_number p)
      (-> p prod/create! prod/set-state-structured! dtbook/dtbook-file)
      (-> p prod/create!))))

(defn create-archived-productions!
  "Create all productions with state \"archived\""
  [productions]
  (->> (filter archived? productions)
       (map #(assoc % :state "archived"))
       (map prod/add-default-meta-data)
       (apply jdbc/insert! db :production)))

(defn create-recording-productions-with-struct!
  "Create all productions with state \"recording\" that do not contain
  any wav but a struct file. Add to the db, create the directories and
  create the config file. Finally convert the \"struct.html\""
  [productions]
  (doseq [p (filter #(recording-no-wav-with-struct? %) productions)]
    (-> p
        prod/create!
        prod/set-state-structured!
