rss-thread-watcher/res/ExampleConfig-documented.edn

54 lines
3.3 KiB
Clojure
Raw Normal View History

2024-08-13 03:12:43 +02:00
{:port 6969 ;Port to listen on
:default-board "/mlp/" ;Board to be used when no board=x param given
;; Message displayed when requested board is not enabled
:board-disabled-message "This board is not enabled for feed generation.\n\nYou can contact me here: [contact]"
;; :enable-board-listing true ;Whether to show list of enabled boards in /boards UNIMPLEMENTED
;; The watcher feed will be served by this url, everything else will be 404
:served-filename "/feed"
;; This is homepage for your feed, it should probably redirect somewhere where you mention
;; What things you have enabled and where to find full docs
:homepage "https://git.treebrary.org/Treebrary.org/rss-thread-watcher"
2024-08-13 03:12:43 +02:00
;; This map defines default values for all enabled boards, if you wish for some board
;; to use different values, specify them bellow in :borads-enabled
:boards-defaults {
;; After how many seconds get fresh catalog.json from :target
:refresh-rate 300
;; Page from which to start indexing threads, threads on pages with lower
;; numbers will not be detectable by the feed watcher
:starting-page 7
;; Default ChOD to use if none is specified by the user
:default-chod 94
;; This is target for Catalog API requests
;; {board} will be substitued for board
:target "https://api.4chan.org/{board}/catalog.json"
;; This is where threads actually reside if different from :target
;; you can use {board} and {threadnum} for substitutions
:host "https://boards.4chan.org/{board}/thread/{threadnum}"
2024-08-13 03:12:43 +02:00
;; Commented parts bellow are still unimplemented
;; ------
;; Only download catalog when someone requests feed and cache is old
;; Saves requests to 4chan, usefull for boards that are checked rarely
;; Generally the better option, first request in taken in :refresh-rate may take longer
;; Currently the only option
:lazy-load true
;; Whether to allow regex search thru the threads (&qr= param) UNIMPLEMENTED
;; :regex-enable true
;; Wheter to create cache by downloading whole catalog or every required
;; page one by one UNIMPLEMENTED
;; :request-type [:catalog] :pages
}
;; List of all boards that are enabled for feed generation
;; Yes they must be all listed manualy for now
;; Each such board must have map of altered config options if aplicable
;; otherwise empty one must be provided
:boards-enabled {"/mlp/" {} ;; Empty override map means that defaults are used
;; This means that board "/g/" will have :starting-page set to 7 but all
;; the other config options are copied from :board-defaults
"/g/" {:starting-page 7}
"/po/" {:starting-page 8
:refresh-rate 86400} ;1 day
"/p/" {:starting-page 8
:refresh-rate 1800} ;30 min
}
}