blob: 3203ecfbfb6de94fda557cd34149393f875c3977 (
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
<?xml version='"1.0"' encoding='"UTF-8"'?>
<rss version='2.0' xmlns:atom='"http://www.w3.org/2005/Atom"' xmlns:content='http://purl.org/rss/1.0/modules/content/'>
<channel>
<title>Become Digitally Sovereign</title>
<link>https://copyleftculture.com</link>
<description>Blog posts on digital sovereignty</description>
<language>en-gb</language>
<atom:link href='"https://copyleftculture.com/feed.xml"' rel='"self"' type='"application/rss+xml"' />
<ttl>60</ttl>
#!
now=`date -R`
#!
<lastBuildDate>${now}</lastBuildDate>
#!
for f in `ls -t blog/*.html`
do
if [ $(basename "${f}") != "index.html" ]; then
title=`sed -n 's/.*<h1>\(.*\)<\/h1>.*/\1/ip;T;q' ${f}`
title=${title% |*}
desc=`sed -n 's/.*<h2>\(.*\)<\/h2>.*/\1/ip;T;q' ${f}`
linque=$1/blog/$(basename "${f}")
pubDate=${f#blog/}
pubDate=${pubDate%%-*}
pubDate=`date -R -d ${pubDate}`
content=`sed -n '/<main>/,/<\/main>/{//!p;}' ${f}`
#!
<item>
<title>${title}</title>
<link>${linque}</link>
<guid>${linque}</guid>
<description>${desc}</description>
<pubDate>${pubDate}</pubDate>
<content:encoded><![CDATA[${content}]]></content:encoded>
</item>
#!
fi
done
#!
</channel>
</rss>
|