Emergency bugfix for wrong URL generation

This commit is contained in:
Felisp 2024-08-27 14:24:09 +02:00
parent afdeca4e37
commit 6c825bcaaa
3 changed files with 5 additions and 4 deletions

View file

@ -1,4 +1,4 @@
(defproject rss-thread-watch "0.4.2-SNAPSHOT" (defproject rss-thread-watch "0.4.3-SNAPSHOT"
:description "RSS based thread watcher" :description "RSS based thread watcher"
:url "http://example.com/FIXME" :url "http://example.com/FIXME"
:license {:name "AGPL-3.0-only" :license {:name "AGPL-3.0-only"

View file

@ -23,7 +23,7 @@
[rss-thread-watch.utils :as u]) [rss-thread-watch.utils :as u])
(:gen-class)) (:gen-class))
(def VERSION "0.4.2") (def VERSION "0.4.3")
;; Internal default config ;; Internal default config
(def CONFIG-DEFAULT (def CONFIG-DEFAULT
@ -36,6 +36,7 @@
:starting-page 7 :starting-page 7
:default-chod 94 :default-chod 94
:target "https://api.4chan.org" :target "https://api.4chan.org"
:host "https://boards.4chan.org"
:lazy-load true} :lazy-load true}
:boards-enabled {"/mlp/" {:lazy-load false} :boards-enabled {"/mlp/" {:lazy-load false}
"/g/" {:starting-page 7} "/g/" {:starting-page 7}

View file

@ -86,7 +86,7 @@
(defn thread-to-rss-item (defn thread-to-rss-item
"Converts cached thread item to feed item which can be serialized into RSS" "Converts cached thread item to feed item which can be serialized into RSS"
[t host board] [t host board]
(let [link-url (str host board (:no t))] (let [link-url (str host board "thread/" (:no t))] ;Hardcode emergency bugfix
{:title (format "%.2f%% - %s" (:chod t) (:title t)) ;TODO: Generate link from the target somehow, or just include it from API response {:title (format "%.2f%% - %s" (:chod t) (:title t)) ;TODO: Generate link from the target somehow, or just include it from API response
;; :url link-url <- this is supposed to be for images according to: https://cyber.harvard.edu/rss/rss.html ;; :url link-url <- this is supposed to be for images according to: https://cyber.harvard.edu/rss/rss.html
:description (format "The thread: '%s' has %.2f%% chance of dying" (:title t) (:chod t)) :description (format "The thread: '%s' has %.2f%% chance of dying" (:title t) (:chod t))
@ -97,7 +97,7 @@
"Generates feed from matching items" "Generates feed from matching items"
[query-vec chod-treshold repeat? cache board-config] [query-vec chod-treshold repeat? cache board-config]
(let [items (filter-chod-posts query-vec chod-treshold repeat? cache) (let [items (filter-chod-posts query-vec chod-treshold repeat? cache)
head {:title "RSS Thread watcher v0.4.2" ;TODO: hardcoded string here, remake to reference to config.clj head {:title "RSS Thread watcher v0.4.3" ;TODO: hardcoded string here, remake to reference to config.clj
:link "https://tools.treebrary.org/thread-watcher/feed.xml" :link "https://tools.treebrary.org/thread-watcher/feed.xml"
:feed-url "https://tools.treebrary.org/thread-watcher/feed.xml" :feed-url "https://tools.treebrary.org/thread-watcher/feed.xml"
:description "RSS based thread watcher"} :description "RSS based thread watcher"}