<commit_before>(ns rill.cli
  (:require [rill.event-store.atom-store :refer [atom-event-store]]
            [rill.event-channel :refer [event-channel]]
            [rill.event-stream :refer [all-events-stream-id]]
            [rill.event-store.atom-store.event :refer [unprocessable?]]
            [clojure.core.async :refer [<!!]])
  (:gen-class))

(defn -main [url user password]
  {:pre [url user password]}
  (let [ch (event-channel (atom-event-store url {:user user :password password})
                          all-events-stream-id -1 0)]
    (println "Printing all events...")
    (loop []
      (if-let [e (<!! ch)]
        (do (if (unprocessable? e)
              (println "Skipped message.")
              (prn e))
            (recur))))))


<commit_msg>Make it possible to use the psql event store<commit_after>(ns rill.cli
  (:require [rill.event-store.psql :refer [psql-event-store]]
            [rill.event-channel :refer [event-channel]]
            [rill.event-stream :refer [all-events-stream-id]]
            [rill.event-store.atom-store.event :refer [unprocessable?]]
            [clojure.core.async :refer [<!!]])
  (:gen-class))

(defn -main [url]
  {:pre [url]}
  (let [ch (event-channel (psql-event-store url)
                          all-events-stream-id -1 0)]
    (println "Printing all events...")
    (loop []
      (if-let [e (<!! ch)]
        (do (if (unprocessable? e)
              (println "Skipped message.")
              (prn e))
            (recur))))))



{'fraction_non_alphanumeric': 0.16923076923076924, 'fraction_numerical': 0.0026755852842809363, 'mean_word_length': 2.078189300411523, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1152659', 'n_tokens_mistral': 502, 'n_tokens_neox': 493, 'n_words': 114}