just a single rss

This commit is contained in:
gutmet 2020-10-29 19:33:56 +01:00
parent cc4d6925f8
commit 17e98a002e
2 changed files with 4 additions and 45 deletions

View File

@ -2,17 +2,17 @@
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>Home</title>
<link>https://twitter.com/home</link>
<description>Twitter Home</description>
<link>https://twitter.com</link>
<description>Twitter</description>
{{range $index, $post := .}}
<item>
<title>{{$post.Id_str}}</title>
<title>{{$post.User.Screen_name}} ({{$post.Id_str}})</title>
<content:encoded><![CDATA[
{{$status := $post}}
{{if $status.Retweeted_status}}
{{$status = $post.Retweeted_status}}
RT
{{$post.User.Screen_name}} retweeted
{{end}}
{{$user := $status.User.Screen_name}}

View File

@ -1,41 +0,0 @@
<?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}}
<br><a href="https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}"><img src="{{$media.Media_url}}"></a>
{{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}}
<br><a href="https://twitter.com/$$USERNAME$$/status/{{$post.Id_str}}"><img src="{{$media.Media_url}}"></a>
{{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>