Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -9,9 +9,9 @@
|
|||||||
#elif tweet.reply.len > 0: result = &"R to @{tweet.reply[0]}: "
|
#elif tweet.reply.len > 0: result = &"R to @{tweet.reply[0]}: "
|
||||||
#end if
|
#end if
|
||||||
#var text = stripHtml(tweet.text)
|
#var text = stripHtml(tweet.text)
|
||||||
##if unicode.runeLen(text) > 32:
|
#if unicode.runeLen(text) > 100:
|
||||||
## text = unicode.runeSubStr(text, 0, 32) & "..."
|
# text = unicode.runeSubStr(text, 0, 64) & "..."
|
||||||
##end if
|
#end if
|
||||||
#result &= xmltree.escape(text)
|
#result &= xmltree.escape(text)
|
||||||
#if result.len > 0: return
|
#if result.len > 0: return
|
||||||
#end if
|
#end if
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc getDescription(desc: string; cfg: Config): string =
|
#proc getDescription(desc: string; cfg: Config): string =
|
||||||
Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
Twitter feed for: ${desc}. Generated by ${getUrlPrefix(cfg)}
|
||||||
#end proc
|
#end proc
|
||||||
#
|
#
|
||||||
#proc getTweetsWithPinned(profile: Profile): seq[Tweets] =
|
#proc getTweetsWithPinned(profile: Profile): seq[Tweets] =
|
||||||
@@ -56,7 +56,10 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
|||||||
<img src="${urlPrefix}${getPicUrl(photo)}" style="max-width:250px;" />
|
<img src="${urlPrefix}${getPicUrl(photo)}" style="max-width:250px;" />
|
||||||
# end for
|
# end for
|
||||||
#elif tweet.video.isSome:
|
#elif tweet.video.isSome:
|
||||||
<img src="${urlPrefix}${getPicUrl(get(tweet.video).thumb)}" style="max-width:250px;" />
|
<a href="${urlPrefix}${tweet.getLink}">
|
||||||
|
<br>Video<br>
|
||||||
|
<img src="${urlPrefix}${getPicUrl(get(tweet.video).thumb)}" style="max-width:250px;" />
|
||||||
|
</a>
|
||||||
#elif tweet.gif.isSome:
|
#elif tweet.gif.isSome:
|
||||||
# let thumb = &"{urlPrefix}{getPicUrl(get(tweet.gif).thumb)}"
|
# let thumb = &"{urlPrefix}{getPicUrl(get(tweet.gif).thumb)}"
|
||||||
# let url = &"{urlPrefix}{getPicUrl(get(tweet.gif).url)}"
|
# let url = &"{urlPrefix}{getPicUrl(get(tweet.gif).url)}"
|
||||||
@@ -69,14 +72,17 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
|||||||
# end if
|
# end if
|
||||||
#end if
|
#end if
|
||||||
#if tweet.quote.isSome and get(tweet.quote).available:
|
#if tweet.quote.isSome and get(tweet.quote).available:
|
||||||
# let quoteLink = getLink(get(tweet.quote))
|
# let quoteTweet = get(tweet.quote)
|
||||||
|
# let quoteLink = urlPrefix & getLink(quoteTweet)
|
||||||
|
<hr/>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>
|
<b>${quoteTweet.user.fullname} (@${quoteTweet.user.username})</b>
|
||||||
${renderRssTweet(get(tweet.quote), cfg)}
|
<p>
|
||||||
</p>
|
${renderRssTweet(quoteTweet, cfg)}
|
||||||
<footer>
|
</p>
|
||||||
— <cite><a href="${urlPrefix}${quoteLink}">${cfg.hostname}${quoteLink}</a></cite>
|
<footer>
|
||||||
</footer>
|
— <cite><a href="${quoteLink}">${quoteLink}</a>
|
||||||
|
</footer>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
#end if
|
#end if
|
||||||
#end proc
|
#end proc
|
||||||
@@ -101,6 +107,18 @@ Twitter feed for: ${desc}. Generated by ${cfg.hostname}
|
|||||||
<title>${getTitle(tweet, retweet)}</title>
|
<title>${getTitle(tweet, retweet)}</title>
|
||||||
<dc:creator>@${tweet.user.username}</dc:creator>
|
<dc:creator>@${tweet.user.username}</dc:creator>
|
||||||
<description><![CDATA[${renderRssTweet(tweet, cfg).strip(chars={'\n'})}]]></description>
|
<description><![CDATA[${renderRssTweet(tweet, cfg).strip(chars={'\n'})}]]></description>
|
||||||
|
# let desc = renderRssTweet(tweet, cfg).strip(chars={'\n'})
|
||||||
|
# if retweet.len > 0:
|
||||||
|
<description><![CDATA[
|
||||||
|
<blockquote>
|
||||||
|
<b>${tweet.user.fullname} (@${tweet.user.username})</b>
|
||||||
|
<p>${desc}</p>
|
||||||
|
<footer>— <cite><a href="${urlPrefix & link}">${urlPrefix & link}</a></footer>
|
||||||
|
</blockquote>
|
||||||
|
]]></description>
|
||||||
|
# else:
|
||||||
|
<description><![CDATA[${desc}]]></description>
|
||||||
|
# end if
|
||||||
<pubDate>${getRfc822Time(tweet)}</pubDate>
|
<pubDate>${getRfc822Time(tweet)}</pubDate>
|
||||||
<guid>${urlPrefix & link}</guid>
|
<guid>${urlPrefix & link}</guid>
|
||||||
<link>${urlPrefix & link}</link>
|
<link>${urlPrefix & link}</link>
|
||||||
|
|||||||
Reference in New Issue
Block a user