diff options
Diffstat (limited to 'tmpl.feed.xml')
-rw-r--r-- | tmpl.feed.xml | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/tmpl.feed.xml b/tmpl.feed.xml index fc82a67..db40258 100644 --- a/tmpl.feed.xml +++ b/tmpl.feed.xml | |||
@@ -9,19 +9,21 @@ | |||
9 | <rights>Copyright (C) 2022 CC-BY-SA Case Duckworth</rights> | 9 | <rights>Copyright (C) 2022 CC-BY-SA Case Duckworth</rights> |
10 | <updated>$(date -u +%FT%TZ)</updated> | 10 | <updated>$(date -u +%FT%TZ)</updated> |
11 | 11 | ||
12 | $(cat .tmp/index-list | sort -r | while read line; do | 12 | $(sort -r .tmp/index-list | while read line; do |
13 | entry_date="$(echo "$line" | sed 's/.*<li><!-- \(.*\) -->.*/\1/')" | 13 | entry_date="$(echo "$line" | sed 's/.*<li><!-- \(.*\) -->.*/\1/')" |
14 | entry_title="$(echo "$line" | sed 's#.*<a href=".*">\(.*\)</a>.*#\1#')" | 14 | entry_title="$(echo "$line" | sed 's#.*<a href=".*">\(.*\)</a>.*#\1#')" |
15 | entry_html="$(echo "$line" | sed 's#.*<a href="\(.*\)">.*#\1#')" | 15 | entry_html="$(echo "$line" | sed 's#.*<a href="\(.*\)">.*#\1#')" |
16 | entry_url="https://acdw.casa/$entry_html" | 16 | entry_url="https://acdw.casa/$entry_html" |
17 | print "<entry>" | 17 | cat <<END_OF_ENTRY |
18 | print "<id>$entry_url</id>" | ||
19 | print "<link rel=\"alternate\" type=\"text/html\" href=\"$entry_url\" />" | ||
20 | print "<title>$entry_title</title>" | ||
21 | print "<updated>$entry_date</updated>" | ||
22 | print "<author><name>Case Duckworth</name></author>" | ||
23 | print "<content type=\"html\"><![CDATA[$(sed 1d "${entry_html%ml}.bod.txt")]]></content>" | ||
24 | print "</entry>" | ||
25 | done) | ||
26 | 18 | ||
19 | <entry> | ||
20 | <id>$entry_url</id> | ||
21 | <link rel="alternate" type="text/html" href="$entry_url" /> | ||
22 | <title>$entry_title</title> | ||
23 | <updated>$entry_date</updated> | ||
24 | <author><name>Case Duckworth</name></author> | ||
25 | <content type="html"><![CDATA[$(sed 1d "${entry_html%ml}.bod.txt")]]></content> | ||
26 | </entry> | ||
27 | END_OF_ENTRY | ||
28 | done) | ||
27 | </feed> | 29 | </feed> |