parent
2422a2b8b7
commit
e183a9c789
3 changed files with 8 additions and 4 deletions
|
@ -32,7 +32,9 @@ proc getConfig*(path: string): (Config, parseCfg.Config) =
|
|||
redisHost: cfg.get("Cache", "redisHost", "localhost"),
|
||||
redisPort: cfg.get("Cache", "redisPort", 6379),
|
||||
redisConns: cfg.get("Cache", "redisConnections", 20),
|
||||
redisMaxConns: cfg.get("Cache", "redisMaxConnections", 30)
|
||||
redisMaxConns: cfg.get("Cache", "redisMaxConnections", 30),
|
||||
|
||||
replaceYouTube: cfg.get("Preferences", "replaceYouTube", "piped.kavin.rocks")
|
||||
)
|
||||
|
||||
return (conf, cfg)
|
||||
|
|
|
@ -221,6 +221,8 @@ type
|
|||
redisConns*: int
|
||||
redisMaxConns*: int
|
||||
|
||||
replaceYouTube*: string
|
||||
|
||||
Rss* = object
|
||||
feed*, cursor*: string
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
|||
#end proc
|
||||
#
|
||||
#proc renderTimelineRss*(timeline: Timeline; profile: Profile; cfg: Config; multi=false): string =
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: "piped.kavin.rocks")
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
|
||||
#let urlPrefix = getUrlPrefix(cfg)
|
||||
#result = ""
|
||||
#let user = (if multi: "" else: "@") & profile.username
|
||||
|
@ -101,7 +101,7 @@ ${renderRssTweets(timeline.content, prefs, cfg)}
|
|||
#end proc
|
||||
#
|
||||
#proc renderListRss*(tweets: seq[Tweet]; list: List; cfg: Config): string =
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: "piped.kavin.rocks")
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
|
||||
#let link = &"{getUrlPrefix(cfg)}/{list.username}/lists/{list.name}"
|
||||
#result = ""
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
@ -119,7 +119,7 @@ ${renderRssTweets(tweets, prefs, cfg)}
|
|||
#end proc
|
||||
#
|
||||
#proc renderSearchRss*(tweets: seq[Tweet]; name, param: string; cfg: Config): string =
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: "piped.kavin.rocks")
|
||||
#let prefs = Prefs(replaceTwitter: cfg.hostname, replaceYouTube: cfg.replaceYouTube)
|
||||
#let link = &"{getUrlPrefix(cfg)}/search"
|
||||
#let escName = xmltree.escape(name)
|
||||
#result = ""
|
||||
|
|
Loading…
Reference in a new issue