add ASS support

trunk
vilmibm 2024-05-19 23:24:56 +00:00
parent 883f496d92
commit 9514119b75
3 changed files with 17 additions and 1 deletions

2
feed.tmpl.ass 100644
View File

@ -0,0 +1,2 @@
# Actually Simple Syndication, see https://tilde.town/~dzwdz/ass

View File

@ -5,6 +5,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="alternate" type="application/rss+xml" href="feed.xml" title="the web log of vilmibm"> <link rel="alternate" type="application/rss+xml" href="feed.xml" title="the web log of vilmibm">
<link rel="alternate" type="application/ass" href="feed.ass" title="the web log of vilmibm">
<style> <style>
body { body {
background-color: #070e0f; background-color: #070e0f;
@ -77,5 +78,5 @@
<h1>the web log of ~vilmibm</h1> <h1>the web log of ~vilmibm</h1>
<p id="back">back to my <a href="https://tilde.town/~vilmibm">home page</a></p> <p id="back">back to my <a href="https://tilde.town/~vilmibm">home page</a></p>
<p id="feeds"> <p id="feeds">
<a href="feed.xml">rss feed</a> <a href="feed.xml">rss feed</a>, <a href="feed.ass">ass feed</a>
</p> </p>

13
make.sh
View File

@ -20,6 +20,9 @@ geminiIndex="${geminiPath}/index.gmi"
rssIndexTmpl=$srcDir/feed.tmpl.xml rssIndexTmpl=$srcDir/feed.tmpl.xml
rssIndex=$HOME/public_html/blog/feed.xml rssIndex=$HOME/public_html/blog/feed.xml
assIndexTmpl=$srcDir/feed.tmpl.ass
assIndex=$HOME/public_html/blog/feed.ass
# attempt compilation # attempt compilation
if [ ! -e "linkpost" ] if [ ! -e "linkpost" ]
then then
@ -40,8 +43,15 @@ then
cp $rssIndex "${rssIndex}.bak" cp $rssIndex "${rssIndex}.bak"
fi fi
# backup ASS feed
if [ -e "${assIndex}" ]
then
cp $assIndex "${assIndex}.bak"
fi
cp $htmlIndexTmpl $htmlIndex cp $htmlIndexTmpl $htmlIndex
cp $rssIndexTmpl $rssIndex cp $rssIndexTmpl $rssIndex
cp $assIndexTmpl $assIndex
# Remove old gopher and gemini posts # Remove old gopher and gemini posts
rm -f ${gopherPath}/* rm -f ${gopherPath}/*
@ -110,6 +120,9 @@ do
echo " <pubDate>${rfc822}</pubDate>" >> $rssIndex echo " <pubDate>${rfc822}</pubDate>" >> $rssIndex
echo " <description>${summary}</description>" >> $rssIndex echo " <description>${summary}</description>" >> $rssIndex
echo " </item>" >> $rssIndex echo " </item>" >> $rssIndex
# ASS
echo "$(date -d"$pubdate" +'%Y-%m-%d') ${httpLink} ${title}" >> $assIndex
fi fi
done done