diff options
author | Case Duckworth | 2022-08-02 22:47:49 -0500 |
---|---|---|
committer | Case Duckworth | 2022-08-02 22:47:49 -0500 |
commit | daaf29781cc3237c1d001ed5161683e7b6cf8250 (patch) | |
tree | fa3df0990d82e8a63a32d83cd75b4b902a2b92dd | |
parent | Change license to GCL (diff) | |
download | shatom-daaf29781cc3237c1d001ed5161683e7b6cf8250.tar.gz shatom-daaf29781cc3237c1d001ed5161683e7b6cf8250.zip |
Add rss.conf.sh
-rw-r--r-- | rss.conf.sh | 39 |
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 | |||
5 | feed_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> | ||
17 | EOF | ||
18 | } | ||
19 | |||
20 | feed_footer() { | ||
21 | cat <<END | ||
22 | </channel> | ||
23 | </rss> | ||
24 | END | ||
25 | } | ||
26 | |||
27 | feed_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> | ||
38 | EOF | ||
39 | } | ||