Optimize timeline data structure
This commit is contained in:
@@ -56,16 +56,16 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
||||
#end if
|
||||
#end proc
|
||||
#
|
||||
#proc renderRssTweets(tweets: seq[Chain]; cfg: Config; userId=""): string =
|
||||
#proc renderRssTweets(tweets: seq[Tweets]; cfg: Config; userId=""): string =
|
||||
#let urlPrefix = getUrlPrefix(cfg)
|
||||
#var links: seq[string]
|
||||
#for c in tweets:
|
||||
# for t in c.content:
|
||||
# if userId.len > 0 and t.user.id != userId: continue
|
||||
#for thread in tweets:
|
||||
# for tweet in thread:
|
||||
# if userId.len > 0 and tweet.user.id != userId: continue
|
||||
# end if
|
||||
#
|
||||
# let retweet = if t.retweet.isSome: t.user.username else: ""
|
||||
# let tweet = if retweet.len > 0: t.retweet.get else: t
|
||||
# let retweet = if tweet.retweet.isSome: tweet.user.username else: ""
|
||||
# let tweet = if retweet.len > 0: tweet.retweet.get else: tweet
|
||||
# let link = getLink(tweet)
|
||||
# if link in links: continue
|
||||
# end if
|
||||
@@ -113,7 +113,7 @@ ${renderRssTweets(profile.tweets.content, cfg, userId=profile.user.id)}
|
||||
</rss>
|
||||
#end proc
|
||||
#
|
||||
#proc renderListRss*(tweets: seq[Chain]; list: List; cfg: Config): string =
|
||||
#proc renderListRss*(tweets: seq[Tweets]; list: List; cfg: Config): string =
|
||||
#let link = &"{getUrlPrefix(cfg)}/i/lists/{list.id}"
|
||||
#result = ""
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
@@ -130,7 +130,7 @@ ${renderRssTweets(tweets, cfg)}
|
||||
</rss>
|
||||
#end proc
|
||||
#
|
||||
#proc renderSearchRss*(tweets: seq[Chain]; name, param: string; cfg: Config): string =
|
||||
#proc renderSearchRss*(tweets: seq[Tweets]; name, param: string; cfg: Config): string =
|
||||
#let link = &"{getUrlPrefix(cfg)}/search"
|
||||
#let escName = xmltree.escape(name)
|
||||
#result = ""
|
||||
|
||||
Reference in New Issue
Block a user