Merge release Beta 1 into stable #21

Merged
Felisp merged 35 commits from dev into stable 2024-08-13 17:48:09 +02:00
Showing only changes of commit e230e33a55 - Show all commits

View file

@ -18,7 +18,8 @@
[ring.adapter.jetty :as jetty] [ring.adapter.jetty :as jetty]
[ring.middleware.params :as rp] [ring.middleware.params :as rp]
[rss-thread-watch.watcher :as watcher] [rss-thread-watch.watcher :as watcher]
[rss-thread-watch.feed-generator :as feed]) [rss-thread-watch.feed-generator :as feed]
[rss-thread-watch.utils :as u])
(:gen-class)) (:gen-class))
;; Internal default config ;; Internal default config
@ -62,17 +63,18 @@
lastly uses default internal" lastly uses default internal"
;; args do not include path to executable so first arg ;; args do not include path to executable so first arg
;; should be config file ;; should be config file
[cmd-args]) [cmd-args]
(let [file-to-try (u/nil?-else (first cmd-args)
"./config.edn")]
(u/when-else2 (load-config file-to-try)
(println "WARN: Using default internal config because suggessted " file-to-try " not found.")
CONFIG-DEFAULT)))
;; Todo: Add option to write default config to stdout ;; Todo: Add option to write default config to stdout
;; Todo: Discover config file if not arguments else
;; ./config.edn if not found spit error about
;; using default
(defn -main (defn -main
"Entry point, starts webserver" "Entry point, starts webserver"
[& args] [& args]
;; Parse and validate config ;; Todo: Think of a way to start repeated download for every catalog efficiently
;; Think of a way to start repeated download for every catalog efficiently
(let [config (get-some-config args)]) (let [config (get-some-config args)])
(println args) (println args)
(System/exit 0) (System/exit 0)