2022-03-10 07:21:54 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
|
|
|
%{
|
|
|
|
fn statpost {
|
|
|
|
f = $1
|
|
|
|
post_uri = `{echo $f | sed 's,^'$sitedir',,'}
|
|
|
|
title=`{read $f/index.md}
|
2022-08-14 22:59:47 +00:00
|
|
|
relative_uri=`{cleanname `{echo $f | sed -e 's!^'$sitedir'!!'}}
|
|
|
|
post_uri=$base_url^$relative_uri^'/'
|
2022-03-10 07:21:54 +00:00
|
|
|
by=`{ls -m $f | sed 's/^\[//g; s/].*$//g' >[2]/dev/null}
|
2022-08-14 22:59:47 +00:00
|
|
|
extracted_on=`{echo $relative_uri | sed 's|/blog/||g' | head -c 10 }
|
|
|
|
published_on=`{ /bin/date -R -D '%Y/%m/%d' -d $extracted_on }
|
2024-09-10 16:57:05 +00:00
|
|
|
ifs=() {summary=`{ cat $f/index.md | head -n 10 | strip_title_from_md_file | ifs=$difs {$formatter | escape_html} }}
|
2023-08-16 20:14:00 +00:00
|
|
|
# % could also add a | head -n 10 to only show the first few lines.
|
2022-03-10 07:21:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
|
|
|
|
<channel>
|
|
|
|
<atom:link href="%($base_url^$req_path%)" rel="self" type="application/rss+xml" />
|
|
|
|
<title><![CDATA[%($siteTitle%)]]></title>
|
|
|
|
<link>%($base_url^$req_path%)</link>
|
|
|
|
<description><![CDATA[%($blogDesc%)]]></description>
|
|
|
|
<language>en-us</language>
|
|
|
|
<generator><![CDATA[Tom Duff's rc, and Kris Maglione's clever hackery]]></generator>
|
|
|
|
%{
|
|
|
|
# <webMaster>uriel99+rss@gmail.com (Uriel)</webMaster>
|
|
|
|
# rfc2822 last time channel content changed.
|
|
|
|
lbd=`{ndate -m `{date `{mtime `{ls $blagh_root$blagh_dirs/[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/[0-9] | tail -1} | awk '{print $1}'}}}
|
|
|
|
echo '<lastBuildDate>'$"lbd'</lastBuildDate>'
|
|
|
|
# rfc2822 publication date for content in the channel.
|
|
|
|
pubdate=`{ndate -m}
|
|
|
|
for(f in `{get_post_list $blagh_root$blagh_dirs}){
|
|
|
|
statpost $f
|
|
|
|
%}
|
|
|
|
<item>
|
|
|
|
<title><![CDATA[%($title%)]]></title>
|
2022-04-07 14:48:37 +00:00
|
|
|
%{
|
|
|
|
# <author><![CDATA[%($by%)@noreply.cat-v.org (%($by%))]]></author>
|
|
|
|
echo '<author><![CDATA[nuno.sempere@protonmail.com (Nuño Sempere)]]></author>'
|
|
|
|
%}
|
2022-03-10 07:21:54 +00:00
|
|
|
<link>%($post_uri%)</link>
|
|
|
|
<guid isPermaLink="true">%($post_uri%)</guid>
|
2022-08-14 22:59:47 +00:00
|
|
|
<pubDate>%( $published_on %)</pubDate>
|
2022-03-10 07:21:54 +00:00
|
|
|
<description> %($summary%) </description>
|
|
|
|
</item>
|
|
|
|
% }
|
|
|
|
</channel>
|
|
|
|
</rss>
|