swill/rss.template

30 lines
791 B
Plaintext
Raw Normal View History

2022-11-23 21:30:57 +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>Mastodon</title>
<link>https://mastodon.social</link>
<description>Mastodon</description>
{{range $index, $status := .}}
<item>
<title>{{$status.Account.Username}} ({{$status.ID}})</title>
<content:encoded><![CDATA[
{{$user := $status.Account.Username}}
@{{$user}} ({{$status.ID}}): <br><br>
{{replaceAll $status.Content "\n" "<br>"}}
{{range $idxMedia, $media := $status.MediaAttachments}}
<br><a href="{{$media.URL}}">{{$media.Description}}</a>
{{end}}
]]></content:encoded>
<link>{{$status.URL}}</link>
<guid>{{$status.URL}}</guid>
<pubDate>{{$status.CreatedAt.Format "Mon, 02 Jan 2006 15:04:05 -0700"}}</pubDate>
</item>
{{- end}}
</channel>
</rss>