Add asciicast model ns

This commit is contained in:
Marcin Kulik 2017-02-13 19:52:53 +01:00
parent 527db9dd9b
commit be4995c9f9

View File

@ -0,0 +1,13 @@
(ns asciinema.model.asciicast)
(defn json-store-path [{:keys [id file stdout_frames]}]
(cond
file (str "asciicast/file/" id "/" file)
stdout_frames (str "asciicast/stdout_frames/" id "/" stdout_frames)))
(def default-theme "asciinema")
(defn theme-name [asciicast user]
(or (:theme_name asciicast) ; ensure we don't store empty strings in db
(:theme_name user)
default-theme))