Merge release Beta 1 into stable #21
2 changed files with 27 additions and 4 deletions
|
@ -56,6 +56,21 @@
|
||||||
(with-open [r (io/reader fl)]
|
(with-open [r (io/reader fl)]
|
||||||
(edn/read (java.io.PushbackReader. r))))))
|
(edn/read (java.io.PushbackReader. r))))))
|
||||||
|
|
||||||
|
(defn config-fill-board-defaults
|
||||||
|
"Fills every enabled board with default values"
|
||||||
|
[conifg]
|
||||||
|
;; Získat všechny klíče desek které musíme vyplnit
|
||||||
|
;; Každý klíč mergnout s default mapou
|
||||||
|
(u/map-apply-defaults )
|
||||||
|
(let [board-defaults (:boards-default config)
|
||||||
|
boards (keys (:boards-enabled config))]
|
||||||
|
(update-in config '(:boards-enabled) (fn [val]
|
||||||
|
(u/fmap (fn [])
|
||||||
|
val) )
|
||||||
|
;; just do fmap of boards
|
||||||
|
())
|
||||||
|
)
|
||||||
|
|
||||||
(defn get-some-config
|
(defn get-some-config
|
||||||
"Attempts to get config somehow,
|
"Attempts to get config somehow,
|
||||||
first from command line argument
|
first from command line argument
|
||||||
|
@ -67,8 +82,10 @@
|
||||||
(let [file-to-try (u/nil?-else (first cmd-args)
|
(let [file-to-try (u/nil?-else (first cmd-args)
|
||||||
"./config.edn")]
|
"./config.edn")]
|
||||||
(u/when-else (load-config file-to-try)
|
(u/when-else (load-config file-to-try)
|
||||||
(println "WARN: Using default internal config because suggessted " file-to-try " not found.")
|
(println "WARN: Using default internal config because suggessted file: '" file-to-try "' not found.")
|
||||||
CONFIG-DEFAULT)))
|
CONFIG-DEFAULT)))
|
||||||
|
;;TODO: We want to copy default board-local config into every board, that way we won't have to always look
|
||||||
|
;; into defaults, but
|
||||||
|
|
||||||
;; Todo: Add option to write default config to stdout
|
;; Todo: Add option to write default config to stdout
|
||||||
(defn -main
|
(defn -main
|
||||||
|
|
|
@ -19,10 +19,16 @@
|
||||||
(:gen-class))
|
(:gen-class))
|
||||||
|
|
||||||
(def chod-threads-cache
|
(def chod-threads-cache
|
||||||
"Cached vector of threads that have CHanceOfDeath > configured"
|
"Cached map of threads that have CHanceOfDeath > configured"
|
||||||
(atom []))
|
nil)
|
||||||
|
|
||||||
(def time-of-cache (atom 0))
|
(def time-of-cache nil)
|
||||||
|
|
||||||
|
(defn init-global-cache
|
||||||
|
"Initializes global cache of catalogs"
|
||||||
|
[config]
|
||||||
|
(keys (:boards-enabled config))
|
||||||
|
)
|
||||||
|
|
||||||
(defn process-page
|
(defn process-page
|
||||||
"Procesess every thread in page, leaving only relevant information
|
"Procesess every thread in page, leaving only relevant information
|
||||||
|
|
Loading…
Reference in a new issue