<commit_before>(ns comic-reader.dev
  (:require [clojure.repl :refer :all]
            [clojure.tools.namespace.repl :refer [clear refresh]]
            [clansi.core :refer [style]]))

(declare doc-print goto-ns)

(defn welcome []
  (doc-print
   "Welcome to the comic reader. If you want to add a new site,
  run `(add-site)'.  If you want to work on the frontend,
  run `(develop-frontend)'."))

(defn add-site []
  (doc-print
   "Start by running the tests with `(run-site-tests)'. All the tests
  should pass. Now add a new site definition file and run the tests
  again.

  Follow the instructions in the test errors, and hopefully you'll end
  up with a working site scraper.")
  (goto-ns 'comic-reader.site-dev))

(defn develop-frontend []
  (doc-print
   "To get started run `(start-dev!)'.  This will kick off the
  application server, and the figwheel devcard build.")
  (goto-ns 'comic-reader.frontend-dev))

(defn- doc-print [msg]
  (println " " msg))

(defn- goto-ns [ns]
  (require ns)
  (in-ns ns))<commit_msg>Add function to attempt graceful server shutdown<commit_after>(ns comic-reader.dev
  (:require [clojure.repl :refer :all]
            [clojure.tools.namespace.repl :refer [clear refresh]]
            [clansi.core :refer [style]]))

(declare doc-print goto-ns)

(defn welcome []
  (doc-print
   "Welcome to the comic reader. If you want to add a new site,
  run `(add-site)'.  If you want to work on the frontend,
  run `(develop-frontend)'."))

(defn add-site []
  (doc-print
   "Start by running the tests with `(run-site-tests)'. All the tests
  should pass. Now add a new site definition file and run the tests
  again.

  Follow the instructions in the test errors, and hopefully you'll end
  up with a working site scraper.")
  (goto-ns 'comic-reader.site-dev))

(defn develop-frontend []
  (doc-print
   "To get started run `(start-dev!)'.  This will kick off the
  application server, and the figwheel devcard build.")
  (goto-ns 'comic-reader.frontend-dev))

(defn- doc-print [msg]
  (println " " msg))

(defn- goto-ns [ns]
  (require ns)
  (in-ns ns))

(defn attempt-server-shutdown []
  (require 'comic-reader.system)
  (if-let [stop-fn (find-var 'comic-reader.system/stop)]
    (stop-fn)))
{'fraction_non_alphanumeric': 0.13168539325842696, 'fraction_numerical': 0.0, 'mean_word_length': 3.2562141491395793, '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': '2992203', 'n_tokens_mistral': 768, 'n_tokens_neox': 761, 'n_words': 262}