Add asciicast model ns
This commit is contained in:
parent
527db9dd9b
commit
be4995c9f9
13
src/asciinema/model/asciicast.clj
Normal file
13
src/asciinema/model/asciicast.clj
Normal 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))
|
Loading…
Reference in New Issue
Block a user