<commit_before>(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (apply dom/div nil
        (dom/h1 nil "Lab notebook")
        nil
        (for [entry (:entries cursor)]
          (dom/div nil
            (dom/div nil (:summary entry))
            (dom/div nil (:date-time entry))
            (dom/div nil (:notes entry))))))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})
<commit_msg>Move item-view into its own component.<commit_after>(ns lab-notebook.core
  (:require [om.core :as om]
            [om.dom :as dom]))

(defonce appstate (atom {}))

(defn item-view [cursor component]
  (reify
    om/IRender
    (render [this]
      (dom/div nil
        (dom/div nil (:summary cursor))
        (dom/div nil (:date-time cursor))
        (dom/div nil (:notes cursor))))))

(defn app-container [cursor component]
  (reify
    om/IRender
    (render [this]
      (apply dom/div nil
        (dom/h1 nil "Lab notebook")
        nil
        (for [entry (:entries cursor)]
          (om/build item-view entry))))))

(om/root app-container appstate
  {:target (. js/document (getElementById "app"))})

{'fraction_non_alphanumeric': 0.1509727626459144, 'fraction_numerical': 0.0015564202334630351, 'mean_word_length': 2.3664921465968587, 'pattern_counts': {'":': 0, '<': 3, '<?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': '2198181', 'n_tokens_mistral': 426, 'n_tokens_neox': 411, 'n_words': 122}