diff --git a/src/prefs_impl.nim b/src/prefs_impl.nim index d4a0b6b..8435af4 100644 --- a/src/prefs_impl.nim +++ b/src/prefs_impl.nim @@ -92,15 +92,15 @@ genPrefs: "Autoplay gifs" "Link replacements (blank to disable)": - replaceTwitter(input, "nitter.net"): + replaceTwitter(input, ""): "Twitter -> Nitter" placeholder: "Nitter hostname" - replaceYouTube(input, "piped.kavin.rocks"): + replaceYouTube(input, ""): "YouTube -> Piped/Invidious" placeholder: "Piped hostname" - replaceReddit(input, "teddit.net"): + replaceReddit(input, ""): "Reddit -> Teddit/Libreddit" placeholder: "Teddit hostname" diff --git a/src/types.nim b/src/types.nim index 59f141b..c577244 100644 --- a/src/types.nim +++ b/src/types.nim @@ -229,11 +229,6 @@ type redisMaxConns*: int redisPassword*: string - replaceTwitter*: string - replaceYouTube*: string - replaceReddit*: string - replaceInstagram*: string - Rss* = object feed*, cursor*: string diff --git a/src/views/rss.nimf b/src/views/rss.nimf index b6538ad..afdd231 100644 --- a/src/views/rss.nimf +++ b/src/views/rss.nimf @@ -1,16 +1,9 @@ #? stdtmpl(subsChar = '$', metaChar = '#') ## SPDX-License-Identifier: AGPL-3.0-only #import strutils, xmltree, strformat, options -#import ../types, ../utils, ../formatters +#import ../types, ../utils, ../formatters, ../prefs # -#proc getPrefs(cfg: Config): Prefs = -#result.replaceTwitter = cfg.replaceTwitter -#result.replaceYouTube = cfg.replaceYouTube -#result.replaceReddit = cfg.replaceReddit -#result.replaceInstagram = cfg.replaceInstagram -#end proc -# -#proc getTitle(tweet: Tweet; prefs: Prefs; retweet: string): string = +#proc getTitle(tweet: Tweet; retweet: string): string = #if tweet.pinned: result = "Pinned: " #elif retweet.len > 0: result = &"RT by @{retweet}: " #elif tweet.reply.len > 0: result = &"R to @{tweet.reply[0]}: " @@ -31,10 +24,10 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname} #end proc # -#proc renderRssTweet(tweet: Tweet; prefs: Prefs; cfg: Config): string = +#proc renderRssTweet(tweet: Tweet; cfg: Config): string = #let tweet = tweet.retweet.get(tweet) #let urlPrefix = getUrlPrefix(cfg) -#let text = replaceUrls(tweet.text, prefs, absolute=urlPrefix) +#let text = replaceUrls(tweet.text, defaultPrefs, absolute=urlPrefix) #if tweet.quote.isSome and get(tweet.quote).available: # let quoteLink = getLink(get(tweet.quote))
${text}
${cfg.hostname}${quoteLink}