about summary refs log tree commit diff stats
path: root/tmpl.feed.xml
blob: fc82a678e15f1c61a2122588714d252145598398 (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
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>acdw.casa</title>
  <subtitle>mi casa es su casa</subtitle>
  <link href="https://acdw.casa" rel="self" />
  <link href="https://acdw.casa" />
  <id>acdw.casa</id>
  <generator uri="https://git.acdw.net/hat-trick.git/" version="infinite">hat-trick</generator>
  <rights>Copyright (C) 2022 CC-BY-SA Case Duckworth</rights>
  <updated>$(date -u +%FT%TZ)</updated>

  $(cat .tmp/index-list | sort -r | while read line; do
  entry_date="$(echo "$line" | sed 's/.*<li><!-- \(.*\) -->.*/\1/')"
  entry_title="$(echo "$line" | sed 's#.*<a href=".*">\(.*\)</a>.*#\1#')"
  entry_html="$(echo "$line" | sed 's#.*<a href="\(.*\)">.*#\1#')"
  entry_url="https://acdw.casa/$entry_html"
  print "<entry>"
  print "<id>$entry_url</id>"
  print "<link rel=\"alternate\" type=\"text/html\" href=\"$entry_url\" />"
  print "<title>$entry_title</title>"
  print "<updated>$entry_date</updated>"
  print "<author><name>Case Duckworth</name></author>"
  print "<content type=\"html\"><![CDATA[$(sed 1d "${entry_html%ml}.bod.txt")]]></content>"
  print "</entry>"
  done)

</feed>