about summary refs log tree commit diff stats
path: root/tmpl.feed.xml
diff options
context:
space:
mode:
authorCase Duckworth2022-05-24 17:16:49 -0500
committerCase Duckworth2022-05-24 17:16:49 -0500
commit849013a6d2ae99ea1b088298b8f2067818b7404d (patch)
treeec3b58022c90b82425e855fd3c8f864f2671071d /tmpl.feed.xml
parentUse rsync -u to avoid .last_build (diff)
downloadhat-trick-849013a6d2ae99ea1b088298b8f2067818b7404d.tar.gz
hat-trick-849013a6d2ae99ea1b088298b8f2067818b7404d.zip
Generate a feed
Diffstat (limited to 'tmpl.feed.xml')
-rw-r--r--tmpl.feed.xml27
1 files changed, 27 insertions, 0 deletions
diff --git a/tmpl.feed.xml b/tmpl.feed.xml new file mode 100644 index 0000000..d133471 --- /dev/null +++ b/tmpl.feed.xml
@@ -0,0 +1,27 @@
1<?xml version="1.0" encoding="utf-8"?>
2<feed xmlns="http://www.w3.org/2005/Atom">
3 <title>acdw.casa</title>
4 <subtitle>mi casa es su casa</subtitle>
5 <link href="https://acdw.casa" rel="self" />
6 <link href="https://acdw.casa" />
7 <id>acdw.casa</id>
8 <generator uri="https://git.acdw.net/hat-trick.git/" version="infinite">hat-trick</generator>
9 <rights>Copyright (C) 2022 CC-BY-SA Case Duckworth</rights>
10 <updated>$(date -u +%FT%TZ)</updated>
11
12 $(set -x;cat .tmp/index-list | while read line; do
13 entry_date="$(echo "$line" | sed 's/.*<li><!-- \(.*\) -->.*/\1/')"
14 entry_title="$(echo "$line" | sed 's#.*<a href=".*">\(.*\)</a>.*#\1#')"
15 entry_html="$(echo "$line" | sed 's#.*<a href="\(.*\)">.*#\1#')"
16 entry_url="https://acdw.casa/$entry_html"
17 print "<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
27</feed>