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
|
|
|
|
echo "<rss version=\"2.0\"><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
|
|
|
|
echo "<itunes:author>$author</itunes:author>" >> $outfile
|
|
|
|
echo "<itunes:summary>$description</itunes:summary>" >> $outfile
|
|
|
|
echo "<itunes:type>episodic</itunes:type>" >> $outfile
|
|
|
|
echo "<itunes:owner>" >> $outfile
|
|
|
|
echo " <itunes:name>$author</itunes:name>" >> $outfile
|
|
|
|
echo " <itunes:email>$email</itunes:email>" >> $outfile
|
|
|
|
echo "</itunes:owner>" >> $outfile
|
|
|
|
echo "<itunes:explicit>No</itunes:explicit>" >> $outfile
|
|
|
|
echo "<itunes:category text=\"Technology\">" >> $outfile
|
|
|
|
echo "</itunes:category>" >> $outfile
|
|
|
|
echo "<itunes:image href=\"$img_url\"/>" >> $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
|
|
|
|
|