about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--rss.conf.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/rss.conf.sh b/rss.conf.sh new file mode 100644 index 0000000..a97cb45 --- /dev/null +++ b/rss.conf.sh
@@ -0,0 +1,39 @@
1# RSS Configuration file for shatom(1)
2# dedicated to lucidiot
3# https://www.rssboard.org/rss-specification
4
5feed_header() {
6 cat <<EOF
7<?xml version="1.0"?>
8<rss version="2.0">
9<channel>
10<title>$FEED_TITLE</title>
11<link>$SITE_URL</link>
12<description>$FEED_SUBTITLE</description>
13<copyright>$FEED_COPYRIGHT</copyright>
14<lastBuildDate>$FEED_UPDATED</lastBuildDate>
15<generator uri="https://git.acdw.net/shatom" version="infinite">shatom</generator>
16<docs>https://www.rssboard.org/rss-specification</docs>
17EOF
18}
19
20feed_footer() {
21 cat <<END
22</channel>
23</rss>
24END
25}
26
27feed_entry() { # feed_entry FILE
28 ENTRY_URL="$(entry_url "$1")"
29 cat <<EOF
30<item>
31<title>$(entry_title "$1")</title>
32<link>$ENTRY_URL</link>
33<guid>$ENTRY_URL</guid>
34<pubDate>$(entry_updated "$1")</pubDate>
35<author>$(entry_author "$1")</author>
36<description><![CDATA[$(entry_content "$1")]]></description>
37</item>
38EOF
39}