Skip to content

Commit

Permalink
Add some REPL helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Sep 9, 2020
1 parent 2555acb commit 55d023c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/clojurians_log/repl.clj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
(uncaughtException [_ thread throwable]
(println (.getMessage throwable)))))


(defn read-edn [filepath]
(-> filepath
slurp
Expand All @@ -37,6 +38,9 @@
[]
(get-in (app/system) [:datomic :conn]))

(defn db []
(d/db (conn)))

(defn load-slack-data!
"Import Slack users, Channels, and custom emojis."
[]
Expand Down Expand Up @@ -182,10 +186,13 @@
(comment
;; rlwrap nc localhost 50505
(use 'clojurians-log.repl)
(in-ns 'clojurians-log.repl)
(load-slack-data!)
(def result (load-files! (log-files)))
result

(load-files! [f])

(def result (load-files! (drop 1508 (log-files))))
(def rrr (load-files! (filter #(and (.contains (str %) "2020-08") (.contains (str %) "backfill")) (log-files))))

Expand Down

0 comments on commit 55d023c

Please sign in to comment.