                      (read-record file-one file-two idx)
                      (catch Exception e
                        (println "Failed to read record" idx "from" (.getName pdf))
+                       (println "Exception:" (.getMessage e))
                        nil))]
         (if (empty? (:name record))
           records

  (println " DONE"))

(defn -main [path out-path]
  (let [f (File. path)]
    (if (.isDirectory f)
      (doseq [pdf (.listFiles f)]

           [java.io File PrintStream OutputStreamWriter FileOutputStream BufferedWriter]
           [org.apache.commons.io FilenameUtils]))

(def row-height 112)
(def page-two-row-height 116)
(def padding 3)
(def on-page-one? (partial > 17))
(def record-0-y-offset 1690)
(def record-17-y-offset 845)
(defn y-offset [idx]
  (let [page-one? (on-page-one? idx)]
    (+ (if page-one?
         record-0-y-offset
         record-17-y-offset)
       (* (mod idx 17) (+ (if page-one? row-height page-two-row-height)
                          padding)))))


(defn name-rect [y-off]
  (Rectangle. 15 y-off 810 row-height))

(defn hours-rect [y-off]
  (Rectangle. 820 y-off 260 row-height))

(defn reportable-internal-comp [y-off]
  (Rectangle. 1585 y-off 300 row-height))

(defn reportable-external-comp [y-off]
  (Rectangle. 1890 y-off 300 row-height))

(defn other-comp [y-off]
  (Rectangle. 2200 y-off 300 row-height))

(defn parse-name-and-title [name-str]
  (when-let [[_ _ name title] (re-matches #"(\(\d+\))?\W*(.*)\W*(.*)\W*" name-str)]
