supports location matches, adds invoice types

This commit is contained in:
Bryce Covert
2019-10-10 20:09:47 -07:00
parent 1e37a71a4c
commit 8df6fb0279
8 changed files with 78 additions and 9 deletions

View File

@@ -26,6 +26,8 @@
[_ _ value]
value)
(def last-text (atom nil))
(defn template-applies? [text {:keys [keywords]}]
(every? #(re-find % text) keywords))
@@ -49,7 +51,7 @@
:text text}))])))
(defn parse [text]
(println text)
(reset! last-text text)
(->> t/pdf-templates
(filter (partial template-applies? text))
first