Use git for pub date in RSS

I noticed that the RSS feed was using stat to figure out when a file was
modified for its pub date. This has the unfortunate side effect that the
comics are out of order in the RSS feed based on if they are modified
(e.g. for a typo.) This uses git to find out when the file was first
introduced and uses that as the pub date. A note, the file will first
have to be committed before updating the RSS feed, so the steps may look
something like

	just build
	git commit .
	just rss
	git commit .

Hopefully that's not too cumbersome.
pull/2/head
Stef Dunlap 7 months ago
parent 7fe0821867
commit c6b12cd331

@ -1,13 +1,16 @@
#bin/sh
#!/bin/sh
echo "<rss version=\"2.0\"><channel><title>It's Pro Toad and Superb Owl</title>" > feed.xml
echo "<link>https://git.tilde.town/dozens/protoadandsuperbowl</link><description>It's Pro Toad and Superb Owl!</description><atom:link rel=\"self\" type=\"application/rss+xml\" href=\"https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/feed.xml\"/><generator>/bin/sh</generator>" >> feed.xml
for f in $(find . -type f -iname '*.md' -depth 1 ! -name 'README.md' | sed 's/\.\///'); do
for f in *.md; do
if [ $f == "README.md" ]; then
continue
fi
echo "<item>
<title>$f</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/$f</link>
<pubDate>$(stat -f "%m%t%Sm %N" $f | cut -f2 | cut -f1-4 -d ' ')</pubDate>
<pubDate>$(git log --follow --format=%ad --date default $f | tail -1)</pubDate>
<description><![CDATA[" >> feed.xml
pandoc $f >> feed.xml
echo "]]></description>

@ -1,19 +1,18 @@
<rss version="2.0"><channel><title>It's Pro Toad and Superb Owl</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl</link><description>It's Pro Toad and Superb Owl!</description><atom:link rel="self" type="application/rss+xml" href="https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/feed.xml"/><generator>/bin/sh</generator>
<item>
<title>00004.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00004.md</link>
<pubDate>Aug 25 11:13:16 2022</pubDate>
<title>00001.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00001.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
Did you know that one of the very first
television advertisements during the
AFLNFL World Championship Game was for
Budweiser beer? </code></pre>
ya see, some people go real fast
and other people they go real slow
yeah that&#39;s it doncha know </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -22,26 +21,21 @@ Budweiser beer? </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
Yep! I guess you could say it was a SUPER BOWL
PROTO AD! </code></pre>
yeah that&#39;s the real root cause of most
workplace conflict </code></pre>
]]></description>
</item>
<item>
<title>00010.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00010.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<title>00002.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00002.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
a guy was looking for a priest to officiate his
wedding and narrowed it down to his final two
choices. the first one walked in with two
beetles and started praying over the bugs. the
second one started spraying everybody with
holy water from a water gun. Know who he chose? </code></pre>
...and that&#39;s how I became a YAML engineer. </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -50,23 +44,22 @@ holy water from a water gun. Know who he chose? </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
He chose the blesser of two weevils
</code></pre>
To be honest, I&#39;m not sure it&#39;s a real job either.
But they keep giving me YAML and I keep
ENGINEERING it! </code></pre>
]]></description>
</item>
<item>
<title>00001.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00001.md</link>
<pubDate>Aug 25 11:13:16 2022</pubDate>
<title>00003.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00003.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
ya see, some people go real fast
and other people they go real slow
yeah that&#39;s it doncha know </code></pre>
So did you watch the Super Bowl? </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -75,30 +68,23 @@ yeah that&#39;s it doncha know </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
yeah that&#39;s the real root cause of most
workplace conflict </code></pre>
Yeah, me neither. </code></pre>
]]></description>
</item>
<item>
<title>00011.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00011.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<title>00004.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00004.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
So I was down by the capitol and I noticed some
kind of protest was happening. I saw a couple
people wearing US flags and thought to myself,
ew, probably a bunch of treasonous right-wing
fundamentalist bastards. Which, you know, is
always the first thing you think when you see
somebody wearing the US flag. But then I saw
somebody holding a &quot;My Body My Choice&quot; sign and
thought, aw, it must be some pro-choicers! And I
decided to get a little closer to check it out. </code></pre>
Did you know that one of the very first
television advertisements during the
AFLNFL World Championship Game was for
Budweiser beer? </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -107,18 +93,14 @@ decided to get a little closer to check it out. </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
I got close enough to see a bunch of the other
signs and they were all like, &quot;No Jab! No
Vaccine!&quot; and that&#39;s when I knew I had been
tricked. It WAS a bunch of treasonous
right-wing fundamentalist bastards! I said
&quot;ew&quot; again and turned around and ran away. </code></pre>
Yep! I guess you could say it was a SUPER BOWL
PROTO AD! </code></pre>
]]></description>
</item>
<item>
<title>00005.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00005.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<pubDate>Fri Feb 12 10:38:57 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
@ -139,12 +121,72 @@ All I want is like a small cute remote
information HIKING TRAIL somewhere out in the
woods where I can see some flowers and leaves and
listen to the birds and stuff. </code></pre>
]]></description>
</item>
<item>
<title>00006.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00006.md</link>
<pubDate>Fri Feb 26 08:28:46 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
Is there even such a thing as &quot;mainstream&quot;
anymore? I mean it used to be the case that
everybody watched the same nightly news and
listened to the same radio station. And
&quot;counterculture&quot; was growing your hair long
and listening to rock and roll. Now the duality
of mainstream vs. counterculture seems as
quaint as the idea that there are only two
genders or only two sexes. Kids don&#39;t listen to
rock &amp; roll to rebel, they listen to soundcloud
emo rap, or whatever, and if the niche sound that
speaks directly to them doesn&#39;t exist, they can
invent it and upload it for the world to hear with
little more than a cheap laptop. </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
At the other end of the LONG TAIL of the internet
is a metaphorical infosec furry, and because of
them there are as many small STREAMS and
countercultures as there are individual
people. </code></pre>
]]></description>
</item>
<item>
<title>00007.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00007.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<h1 id="pro-toad-and-superb-owl">Pro Toad and Superb Owl</h1>
<pre><code> (@)(@) {0,0}
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;
\
there should be no such thing
as billionaires</code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;</code></pre>
<pre><code> (@)(@) {0,0}
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;</code></pre>
]]></description>
</item>
<item>
<title>00008.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00008.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<pubDate>Fri Feb 26 08:28:46 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
@ -178,7 +220,7 @@ coke. </code></pre>
<item>
<title>00009.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00009.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<pubDate>Sat Apr 17 11:45:40 2021 -0600</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
@ -215,40 +257,21 @@ dragons beating the shit out of nazis. </code></pre>
]]></description>
</item>
<item>
<title>00002.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00002.md</link>
<pubDate>Aug 25 11:13:16 2022</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
...and that&#39;s how a became a YAML engineer. </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
To be honest, I&#39;m not sure it&#39;s a real job either.
But they keep giving me YAML and I keep
ENGINEERING it! </code></pre>
]]></description>
</item>
<item>
<title>00012.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00012.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<title>00010.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00010.md</link>
<pubDate>Wed Dec 1 07:51:43 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
Ed is the standard text editor! </code></pre>
a guy was looking for a priest to officiate his
wedding and narrowed it down to his final two
choices. the first one walked in with two
beetles and started praying over the bugs. the
second one started spraying everybody with
holy water from a water gun. Know who he chose? </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -257,35 +280,30 @@ Ed is the standard text editor! </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
?
?
? </code></pre>
He chose the blesser of two weevils
</code></pre>
]]></description>
</item>
<item>
<title>00006.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00006.md</link>
<pubDate>Aug 25 11:13:17 2022</pubDate>
<title>00011.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00011.md</link>
<pubDate>Thu Feb 3 22:24:58 2022 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
Is there even such a thing as &quot;mainstream&quot;
anymore? I mean it used to be the case that
everybody watched the same nightly news and
listened to the same radio station. And
&quot;counterculture&quot; was growing your hair long
and listening to rock and roll. Now the duality
of mainstream vs. counterculture seems as
quaint as the idea that there are only two
genders or only two sexes. Kids don&#39;t listen to
rock &amp; roll to rebel, they listen to soundcloud
emo rap, or whatever, and if the niche sound that
speaks directly to them doesn&#39;t exist, they can
invent it and upload it for the world to hear with
little more than a cheap laptop. </code></pre>
So I was down by the capitol and I noticed some
kind of protest was happening. I saw a couple
people wearing US flags and thought to myself,
ew, probably a bunch of treasonous right-wing
fundamentalist bastards. Which, you know, is
always the first thing you think when you see
somebody wearing the US flag. But then I saw
somebody holding a &quot;My Body My Choice&quot; sign and
thought, aw, it must be some pro-choicers! And I
decided to get a little closer to check it out. </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -294,45 +312,25 @@ little more than a cheap laptop. </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
At the other end of the LONG TAIL of the internet
is a metaphorical infosec furry, and because of
them there are as many small STREAMS and
countercultures as there are individual
people. </code></pre>
]]></description>
</item>
<item>
<title>00007.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00007.md</link>
<pubDate>Feb 26 08:11:25 2021</pubDate>
<description><![CDATA[
<h1 id="pro-toad-and-superb-owl">Pro Toad and Superb Owl</h1>
<pre><code> (@)(@) {0,0}
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;
\
there should be no such thing
as billionaires</code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;</code></pre>
<pre><code> (@)(@) {0,0}
(~~~~) ./)_)
(&gt;vv&lt;) &quot; &quot;</code></pre>
I got close enough to see a bunch of the other
signs and they were all like, &quot;No Jab! No
Vaccine!&quot; and that&#39;s when I knew I had been
tricked. It WAS a bunch of treasonous
right-wing fundamentalist bastards! I said
&quot;ew&quot; again and turned around and ran away. </code></pre>
]]></description>
</item>
<item>
<title>00003.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00003.md</link>
<pubDate>Aug 25 11:13:16 2022</pubDate>
<title>00012.md</title>
<link>https://git.tilde.town/dozens/protoadandsuperbowl/raw/branch/master/00012.md</link>
<pubDate>Wed Feb 10 12:28:44 2021 -0700</pubDate>
<description><![CDATA[
<pre><code> (@)(@) {0,0}
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot;
\
So did you watch the Super Bowl? </code></pre>
Ed is the standard text editor! </code></pre>
<pre><code> (@)(@) {0,0} -- Hoo?
(~~~~) ./) )
(&gt;vv&lt;) &quot; &quot; </code></pre>
@ -341,7 +339,9 @@ So did you watch the Super Bowl? </code></pre>
(&gt;vv&lt;) &quot; &quot;
\
Yeah, me neither. </code></pre>
?
?
? </code></pre>
]]></description>
</item>
</channel></rss>

Loading…
Cancel
Save