31 lines
716 B
Bash
31 lines
716 B
Bash
|
#!/usr/bin/env sh
|
||
|
database="db/games.rec"
|
||
|
|
||
|
feedtmpl='<item>
|
||
|
<title>{{Game_System}} - {{Game_Module}}</title>
|
||
|
<link>http://tilde.town/~dozens/gamelog/index.html</link>
|
||
|
<pubDate>{{Created}}</pubDate>
|
||
|
<description>
|
||
|
<![CDATA[
|
||
|
{{Text}}
|
||
|
]]>
|
||
|
</description>
|
||
|
</item>
|
||
|
'
|
||
|
|
||
|
|
||
|
exec > dist/feed.xml
|
||
|
cat<<EOF
|
||
|
<rss version="2.0">
|
||
|
<channel>
|
||
|
<title>gamelog</title>
|
||
|
<link>http://tilde.town/~dozens/gamelog/index.html</link>
|
||
|
<description>all the games i play</description>
|
||
|
<atom:link rel="self" type="application/rss+xml" href="http://tilde.town/~dozens/gamelog/feed.xml"/>
|
||
|
EOF
|
||
|
|
||
|
|
||
|
recsel -t Update -j Game $database | recfmt "$feedtmpl"
|
||
|
echo '</channel></rss>'
|
||
|
sed -i '' 's/&/and/g' dist/feed.xml
|