2022-03-04 00:00:50 +00:00
|
|
|
#!/bin/zsh
|
|
|
|
title="Tilde Whirl Tildeverse Podcast"
|
|
|
|
author="dozens"
|
|
|
|
email="dozens@tilde.team"
|
|
|
|
description="the greatest tildeverse podcast in the world"
|
|
|
|
baseurl="https://tilde.town/~dozens/podcast"
|
|
|
|
link="$baseurl/index.html"
|
|
|
|
href="$baseurl/rss.xml"
|
|
|
|
img_url="$baseurl/assets/img/logo.png"
|
|
|
|
outfile="dist/rss.xml"
|
|
|
|
|
2022-03-12 17:06:34 +00:00
|
|
|
|
|
|
|
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $outfile
|
2022-03-29 13:49:36 +00:00
|
|
|
echo "<rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">" >> $outfile
|
|
|
|
echo "<channel><title>$title</title>" >> $outfile
|
2022-03-04 00:00:50 +00:00
|
|
|
echo "<link>$link</link><description>$description</description>" >> $outfile
|
|
|
|
echo "<atom:link rel=\"self\" type=\"application/rss+xml\" href=\"$href\"/>" >> $outfile
|
|
|
|
echo "<image>" >> $outfile
|
|
|
|
echo " <url>$img_url</url>" >> $outfile
|
|
|
|
echo " <title>$title</title>" >> $outfile
|
|
|
|
echo " <link>$link</link>" >> $outfile
|
|
|
|
echo "</image>" >> $outfile
|
|
|
|
echo "<generator>pandoc and stuff</generator>" >> $outfile
|
2022-03-12 17:06:34 +00:00
|
|
|
echo "<lastBuildDate>$(gdate -R)</lastBuildDate>" >> $outfile
|
2022-03-04 00:00:50 +00:00
|
|
|
echo "<atom:link href=\"$href\" rel=\"self\" type=\"application/rss+xml\"/>" >> $outfile
|
2022-03-12 17:06:34 +00:00
|
|
|
echo "<webMaster>$email (dozens)</webMaster>" >> $outfile
|
|
|
|
echo "<managingEditor>$email (dozens)</managingEditor>" >> $outfile
|
2022-03-04 00:00:50 +00:00
|
|
|
echo "<copyright>$author</copyright>" >> $outfile
|
|
|
|
echo "<language>en</language>" >> $outfile
|
|
|
|
|
|
|
|
for file in $(ls -1 content/*.md | sort -r)
|
|
|
|
do
|
|
|
|
dest="${$(basename $file)/md/html}"
|
|
|
|
pandoc --template=templates/podcast-feed-item.template \
|
|
|
|
--variable=url:"$baseurl/$dest" $file \
|
|
|
|
>> $outfile
|
|
|
|
done
|
|
|
|
|
|
|
|
echo '</channel></rss>' >> $outfile
|
|
|
|
|