drivel/rss.template

42 lines
1.3 KiB
Plaintext
Raw Normal View History

2020-10-29 18:00:06 +01:00
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>$$USERNAME$$</title>
<link>https://twitter.com/$$USERNAME$$</link>
<description>$$USERNAME$$</description>
{{range $index, $post := .}}
<item>
<title>{{$post.Id_str}}</title>
<content:encoded><![CDATA[
{{$status := $post}}
{{if $status.Retweeted_status}}
{{$status = $post.Retweeted_status}}
RT
{{end}}
@{{$status.User.Screen_name}}: <br><br>{{$status.Text}}
{{range $idxMedia, $media := $status.Extended_entities.Media}}
2020-10-29 18:07:17 +01:00
<br><a href="https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}"><img src="{{$media.Media_url}}"></a>
2020-10-29 18:00:06 +01:00
{{end}}
{{if $status.Quoted_status}}
<br><br>Quotes
@{{$status.Quoted_status.User.Screen_name}}: <br><br>{{$status.Quoted_status.Text}}
{{range $idxMedia, $media := $status.Quoted_status.Extended_entities.Media}}
2020-10-29 18:07:17 +01:00
<br><a href="https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}"><img src="{{$media.Media_url}}"></a>
2020-10-29 18:00:06 +01:00
{{end}}
{{end}}
]]></content:encoded>
<link>https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}</link>
<guid>https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}</guid>
<pubDate>{{$post.Created_at.Time.Format "Mon, 02 Jan 2006 15:04:05 -0700"}}</pubDate>
</item>
{{- end}}
</channel>
</rss>