rss template for home
This commit is contained in:
parent
ab83844b76
commit
cc4d6925f8
43
rssHome.template
Normal file
43
rssHome.template
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<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>
|
||||||
|
|
||||||
|
{{range $index, $post := .}}
|
||||||
|
<item>
|
||||||
|
<title>{{$post.Id_str}}</title>
|
||||||
|
<content:encoded><![CDATA[
|
||||||
|
{{$status := $post}}
|
||||||
|
{{if $status.Retweeted_status}}
|
||||||
|
{{$status = $post.Retweeted_status}}
|
||||||
|
RT
|
||||||
|
{{end}}
|
||||||
|
{{$user := $status.User.Screen_name}}
|
||||||
|
|
||||||
|
@{{$user}}{{if $status.In_reply_to_status_id_str}} in reply to {{$status.In_reply_to_status_id_str}}{{end}}: <br><br>{{$status.Text}}
|
||||||
|
{{range $idxMedia, $media := $status.Extended_entities.Media}}
|
||||||
|
<br><a href="https://twitter.com/{{$user}}/status/{{$status.Id_str}}"><img src="{{$media.Media_url}}"></a>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
{{if $status.Quoted_status}}
|
||||||
|
{{$quotedUser := $status.Quoted_status.User.Screen_name}}
|
||||||
|
<br><br>Quotes
|
||||||
|
@{{$quotedUser}}: <br><br>{{$status.Quoted_status.Text}}
|
||||||
|
{{range $idxMedia, $media := $status.Quoted_status.Extended_entities.Media}}
|
||||||
|
<br><a href="https://twitter.com/{{$quotedUser}}/status/{{$status.Quoted_status.Id_str}}"><img src="{{$media.Media_url}}"></a>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
|
||||||
|
]]></content:encoded>
|
||||||
|
|
||||||
|
<link>https://twitter.com/{{$user}}/status/{{$status.Id_str}}</link>
|
||||||
|
<guid>https://twitter.com/{{$user}}/status/{{$status.Id_str}}</guid>
|
||||||
|
<pubDate>{{$post.Created_at.Time.Format "Mon, 02 Jan 2006 15:04:05 -0700"}}</pubDate>
|
||||||
|
</item>
|
||||||
|
{{- end}}
|
||||||
|
|
||||||
|
</channel>
|
||||||
|
</rss>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user