diff options
Diffstat (limited to 'share/feed.uppxml')
| -rw-r--r-- | share/feed.uppxml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/share/feed.uppxml b/share/feed.uppxml new file mode 100644 index 0000000..3203ecf --- /dev/null +++ b/share/feed.uppxml @@ -0,0 +1,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> + + |
