blob: a97cb457ff903a793b61705e10f535a267416dc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# RSS Configuration file for shatom(1)
# dedicated to lucidiot
# https://www.rssboard.org/rss-specification
feed_header() {
cat <<EOF
<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>$FEED_TITLE</title>
<link>$SITE_URL</link>
<description>$FEED_SUBTITLE</description>
<copyright>$FEED_COPYRIGHT</copyright>
<lastBuildDate>$FEED_UPDATED</lastBuildDate>
<generator uri="https://git.acdw.net/shatom" version="infinite">shatom</generator>
<docs>https://www.rssboard.org/rss-specification</docs>
EOF
}
feed_footer() {
cat <<END
</channel>
</rss>
END
}
feed_entry() { # feed_entry FILE
ENTRY_URL="$(entry_url "$1")"
cat <<EOF
<item>
<title>$(entry_title "$1")</title>
<link>$ENTRY_URL</link>
<guid>$ENTRY_URL</guid>
<pubDate>$(entry_updated "$1")</pubDate>
<author>$(entry_author "$1")</author>
<description><![CDATA[$(entry_content "$1")]]></description>
</item>
EOF
}
|